{"action":"created","issue":{"url":"https://api.github.com/repos/joeyespo/pytest-watch/issues/46","repository_url":"https://api.github.com/repos/joeyespo/pytest-watch","labels_url":"https://api.github.com/repos/joeyespo/pytest-watch/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/joeyespo/pytest-watch/issues/46/comments","events_url":"https://api.github.com/repos/joeyespo/pytest-watch/issues/46/events","html_url":"https://github.com/joeyespo/pytest-watch/pull/46","id":134322629,"number":46,"title":"Add --onsigint handler, run on KeyboardInterrupt","user":{"login":"blueyed","id":9766,"avatar_url":"https://avatars.githubusercontent.com/u/9766?v=3","gravatar_id":"","url":"https://api.github.com/users/blueyed","html_url":"https://github.com/blueyed","followers_url":"https://api.github.com/users/blueyed/followers","following_url":"https://api.github.com/users/blueyed/following{/other_user}","gists_url":"https://api.github.com/users/blueyed/gists{/gist_id}","starred_url":"https://api.github.com/users/blueyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueyed/subscriptions","organizations_url":"https://api.github.com/users/blueyed/orgs","repos_url":"https://api.github.com/users/blueyed/repos","events_url":"https://api.github.com/users/blueyed/events{/privacy}","received_events_url":"https://api.github.com/users/blueyed/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-02-17T16:04:58Z","updated_at":"2016-04-06T19:42:23Z","closed_at":"2016-03-04T15:38:23Z","pull_request":{"url":"https://api.github.com/repos/joeyespo/pytest-watch/pulls/46","html_url":"https://github.com/joeyespo/pytest-watch/pull/46","diff_url":"https://github.com/joeyespo/pytest-watch/pull/46.diff","patch_url":"https://github.com/joeyespo/pytest-watch/pull/46.patch"},"body":"This gets run on KeyboardInterrupt/SIGINT, which could be sent by a\r\n`--beforerun` script, which kills all child processes (i.e. any\r\ncurrently running py.test instance).\r\n\r\nThis also introduces the explicit \"failed\" state, which is not \"not\r\npassed\" with py.test."},"comment":{"url":"https://api.github.com/repos/joeyespo/pytest-watch/issues/comments/206528299","html_url":"https://github.com/joeyespo/pytest-watch/pull/46#issuecomment-206528299","issue_url":"https://api.github.com/repos/joeyespo/pytest-watch/issues/46","id":206528299,"user":{"login":"blueyed","id":9766,"avatar_url":"https://avatars.githubusercontent.com/u/9766?v=3","gravatar_id":"","url":"https://api.github.com/users/blueyed","html_url":"https://github.com/blueyed","followers_url":"https://api.github.com/users/blueyed/followers","following_url":"https://api.github.com/users/blueyed/following{/other_user}","gists_url":"https://api.github.com/users/blueyed/gists{/gist_id}","starred_url":"https://api.github.com/users/blueyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueyed/subscriptions","organizations_url":"https://api.github.com/users/blueyed/orgs","repos_url":"https://api.github.com/users/blueyed/repos","events_url":"https://api.github.com/users/blueyed/events{/privacy}","received_events_url":"https://api.github.com/users/blueyed/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T19:42:23Z","updated_at":"2016-04-06T19:42:23Z","body":"@joeyespo \r\nIt works great, thanks!\r\nThe only \"downside\" is that a script is required now.\r\nMaybe some printf-replacement could be done on the `--afterrun` argument?\r\n(e.g. '%d' would be replaced by the exit code?!)\r\nOr, what about setting some environment variable (`PTW_EXIT_CODE`), that can be looked at by the command?"}}