{"action":"created","issue":{"url":"https://api.github.com/repos/rpm-software-management/dnf/issues/313","labels_url":"https://api.github.com/repos/rpm-software-management/dnf/issues/313/labels{/name}","comments_url":"https://api.github.com/repos/rpm-software-management/dnf/issues/313/comments","events_url":"https://api.github.com/repos/rpm-software-management/dnf/issues/313/events","html_url":"https://github.com/rpm-software-management/dnf/pull/313","id":95405770,"number":313,"title":"use both CliTransactionDisplay and demands.transaction_display","user":{"login":"rholy","id":5390407,"avatar_url":"https://avatars.githubusercontent.com/u/5390407?v=3","gravatar_id":"","url":"https://api.github.com/users/rholy","html_url":"https://github.com/rholy","followers_url":"https://api.github.com/users/rholy/followers","following_url":"https://api.github.com/users/rholy/following{/other_user}","gists_url":"https://api.github.com/users/rholy/gists{/gist_id}","starred_url":"https://api.github.com/users/rholy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rholy/subscriptions","organizations_url":"https://api.github.com/users/rholy/orgs","repos_url":"https://api.github.com/users/rholy/repos","events_url":"https://api.github.com/users/rholy/events{/privacy}","received_events_url":"https://api.github.com/users/rholy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-16T10:40:25Z","updated_at":"2015-07-16T12:17:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rpm-software-management/dnf/pulls/313","html_url":"https://github.com/rpm-software-management/dnf/pull/313","diff_url":"https://github.com/rpm-software-management/dnf/pull/313.diff","patch_url":"https://github.com/rpm-software-management/dnf/pull/313.patch"},"body":"Tested with this plugin:\r\n\r\n```python\r\nimport dnf.cli.output\r\n\r\nclass Disp(dnf.cli.output.CliTransactionDisplay):\r\n    def event(self, package, action, te_current, te_total, ts_current, ts_total):\r\n        print('event')\r\n    def scriptout(self, msgs):\r\n        print('scriptout')\r\n    def verify_tsi_package(self, pkg, count, total):\r\n        print('verify')\r\n    def errorlog(self, msg):\r\n        print('error')\r\n    def filelog(self, package, action):\r\n        print('filelog')\r\n\r\nclass Command(dnf.cli.Command):\r\n    aliases = ['foo']\r\n    def configure(self, args):\r\n        self.cli.demands.available_repos = True\r\n        self.cli.demands.sack_activation = True\r\n        self.cli.demands.resolving = True\r\n        self.cli.demands.root_user = True\r\n        self.cli.demands.transaction_display = Disp()\r\n    def run(self, args):\r\n        for arg in args:\r\n            self.base.install(arg)\r\n\r\nclass Plugin(dnf.Plugin):\r\n    name = 'foo'\r\n    def __init__(self, base, cli):\r\n        super(Plugin, self).__init__(base, cli)\r\n        if cli:\r\n            cli.register_command(Command)\r\n```\r\n\r\nI'd also consider changing `demands.transaction_display` to `demands.transaction_displays`."},"comment":{"url":"https://api.github.com/repos/rpm-software-management/dnf/issues/comments/121941635","html_url":"https://github.com/rpm-software-management/dnf/pull/313#issuecomment-121941635","issue_url":"https://api.github.com/repos/rpm-software-management/dnf/issues/313","id":121941635,"user":{"login":"mluscon","id":1122010,"avatar_url":"https://avatars.githubusercontent.com/u/1122010?v=3","gravatar_id":"","url":"https://api.github.com/users/mluscon","html_url":"https://github.com/mluscon","followers_url":"https://api.github.com/users/mluscon/followers","following_url":"https://api.github.com/users/mluscon/following{/other_user}","gists_url":"https://api.github.com/users/mluscon/gists{/gist_id}","starred_url":"https://api.github.com/users/mluscon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mluscon/subscriptions","organizations_url":"https://api.github.com/users/mluscon/orgs","repos_url":"https://api.github.com/users/mluscon/repos","events_url":"https://api.github.com/users/mluscon/events{/privacy}","received_events_url":"https://api.github.com/users/mluscon/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T12:17:38Z","updated_at":"2015-07-16T12:17:38Z","body":"> So, is this OK, @mluscon, or should we change our policy?\r\n\r\nYes, it is OK. "}}