{"action":"created","issue":{"url":"https://api.github.com/repos/python-cmd2/cmd2/issues/359","repository_url":"https://api.github.com/repos/python-cmd2/cmd2","labels_url":"https://api.github.com/repos/python-cmd2/cmd2/issues/359/labels{/name}","comments_url":"https://api.github.com/repos/python-cmd2/cmd2/issues/359/comments","events_url":"https://api.github.com/repos/python-cmd2/cmd2/issues/359/events","html_url":"https://github.com/python-cmd2/cmd2/pull/359","id":315099709,"number":359,"title":"[Add] exit_with_error_code attribute","user":{"login":"albertored","id":5650488,"avatar_url":"https://avatars2.githubusercontent.com/u/5650488?v=4","gravatar_id":"","url":"https://api.github.com/users/albertored","html_url":"https://github.com/albertored","followers_url":"https://api.github.com/users/albertored/followers","following_url":"https://api.github.com/users/albertored/following{/other_user}","gists_url":"https://api.github.com/users/albertored/gists{/gist_id}","starred_url":"https://api.github.com/users/albertored/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertored/subscriptions","organizations_url":"https://api.github.com/users/albertored/orgs","repos_url":"https://api.github.com/users/albertored/repos","events_url":"https://api.github.com/users/albertored/events{/privacy}","received_events_url":"https://api.github.com/users/albertored/received_events","type":"User","site_admin":false},"labels":[{"id":324181055,"url":"https://api.github.com/repos/python-cmd2/cmd2/labels/proposal","name":"proposal","color":"ededed","default":false},{"id":324131055,"url":"https://api.github.com/repos/python-cmd2/cmd2/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-17T14:57:12Z","updated_at":"2018-04-17T20:25:56Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/python-cmd2/cmd2/pulls/359","html_url":"https://github.com/python-cmd2/cmd2/pull/359","diff_url":"https://github.com/python-cmd2/cmd2/pull/359.diff","patch_url":"https://github.com/python-cmd2/cmd2/pull/359.patch"},"body":"**UNDER DEPLOYMENT - DO NOT MERGE**\r\n\r\nI added an exception containing an exit code, that is used in `_cmdloop` for exiting the CLI with that exit code. The exception can be raised by users in custom commands or automatically for every command. This last feature can be activated by setting the class attribute `exit_with_error_code` to `True`.\r\n\r\nI know it is on the wrong branch, if you think it's worth merging I will fix tests, and move to the right place.\r\n\r\nSee #358"},"comment":{"url":"https://api.github.com/repos/python-cmd2/cmd2/issues/comments/382130428","html_url":"https://github.com/python-cmd2/cmd2/pull/359#issuecomment-382130428","issue_url":"https://api.github.com/repos/python-cmd2/cmd2/issues/359","id":382130428,"user":{"login":"tleonhardt","id":2812720,"avatar_url":"https://avatars1.githubusercontent.com/u/2812720?v=4","gravatar_id":"","url":"https://api.github.com/users/tleonhardt","html_url":"https://github.com/tleonhardt","followers_url":"https://api.github.com/users/tleonhardt/followers","following_url":"https://api.github.com/users/tleonhardt/following{/other_user}","gists_url":"https://api.github.com/users/tleonhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/tleonhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tleonhardt/subscriptions","organizations_url":"https://api.github.com/users/tleonhardt/orgs","repos_url":"https://api.github.com/users/tleonhardt/repos","events_url":"https://api.github.com/users/tleonhardt/events{/privacy}","received_events_url":"https://api.github.com/users/tleonhardt/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T20:25:56Z","updated_at":"2018-04-17T20:25:56Z","author_association":"OWNER","body":"@albertored I'm not sure that I see this as been generally applicable to all situations.  When we can, we try to steer clear of design/implementation decisions which would in any way impact overall application architecture because we want developers to choose what makes sense for themselves.\r\n\r\nIf you want to take the time to clean it up, base it off of the correct branch, and get all of the tests to pass and add an example then I would be happy to take a look at it and maybe we can find a way to incorporate it that would make sense.  But I don't want you to waste your time.  My tentative thought is that perhaps this is left out of ``cmd2`` and up to the end user.\r\n\r\n@kmvanbrunt or @kotfu do you have any thoughts on this?"}}
{"actor":{"display_login":"tleonhardt"}}