{"comment":{"url":"https://api.github.com/repos/stephen-soltesz/collectd-mlab/comments/10553496","html_url":"https://github.com/stephen-soltesz/collectd-mlab/commit/007583c5ae35d6d32c2ee9e94bf2741de0d56aac#commitcomment-10553496","id":10553496,"user":{"login":"mtlynch","id":7783288,"avatar_url":"https://avatars.githubusercontent.com/u/7783288?v=3","gravatar_id":"","url":"https://api.github.com/users/mtlynch","html_url":"https://github.com/mtlynch","followers_url":"https://api.github.com/users/mtlynch/followers","following_url":"https://api.github.com/users/mtlynch/following{/other_user}","gists_url":"https://api.github.com/users/mtlynch/gists{/gist_id}","starred_url":"https://api.github.com/users/mtlynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtlynch/subscriptions","organizations_url":"https://api.github.com/users/mtlynch/orgs","repos_url":"https://api.github.com/users/mtlynch/repos","events_url":"https://api.github.com/users/mtlynch/events{/privacy}","received_events_url":"https://api.github.com/users/mtlynch/received_events","type":"User","site_admin":false},"position":91,"line":91,"path":"monitoring/check_collectd_mlab.py","commit_id":"007583c5ae35d6d32c2ee9e94bf2741de0d56aac","created_at":"2015-04-02T20:14:56Z","updated_at":"2015-04-02T20:14:56Z","body":"Does this mean that the following code raises an `AttributeError`?\r\n\r\n```\r\nerr = NagiosStateError('Some sort of error')\r\nprint err.status_code\r\n```\r\n`self.status_code` doesn't get assigned if `status_code=STATE_OK` since `STATE_OK` is `0` which is fairly subtle and the code doesn't make it clear that this is deliberate.\r\n\r\nConsider changing line 89 to `status_code=STATE_UNKNOWN` and dropping line 90."}}