{"action":"created","issue":{"url":"https://api.github.com/repos/project-hatohol/hatohol/issues/2388","repository_url":"https://api.github.com/repos/project-hatohol/hatohol","labels_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/2388/labels{/name}","comments_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/2388/comments","events_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/2388/events","html_url":"https://github.com/project-hatohol/hatohol/issues/2388","id":191898851,"number":2388,"title":"What is the purpose of fixing hap2_nagios_ndoutils.py ?","user":{"login":"kz0817","id":2610513,"avatar_url":"https://avatars.githubusercontent.com/u/2610513?v=3","gravatar_id":"","url":"https://api.github.com/users/kz0817","html_url":"https://github.com/kz0817","followers_url":"https://api.github.com/users/kz0817/followers","following_url":"https://api.github.com/users/kz0817/following{/other_user}","gists_url":"https://api.github.com/users/kz0817/gists{/gist_id}","starred_url":"https://api.github.com/users/kz0817/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kz0817/subscriptions","organizations_url":"https://api.github.com/users/kz0817/orgs","repos_url":"https://api.github.com/users/kz0817/repos","events_url":"https://api.github.com/users/kz0817/events{/privacy}","received_events_url":"https://api.github.com/users/kz0817/received_events","type":"User","site_admin":false},"labels":[{"id":44753446,"url":"https://api.github.com/repos/project-hatohol/hatohol/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":{"login":"Mnakagawa","id":7106792,"avatar_url":"https://avatars.githubusercontent.com/u/7106792?v=3","gravatar_id":"","url":"https://api.github.com/users/Mnakagawa","html_url":"https://github.com/Mnakagawa","followers_url":"https://api.github.com/users/Mnakagawa/followers","following_url":"https://api.github.com/users/Mnakagawa/following{/other_user}","gists_url":"https://api.github.com/users/Mnakagawa/gists{/gist_id}","starred_url":"https://api.github.com/users/Mnakagawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mnakagawa/subscriptions","organizations_url":"https://api.github.com/users/Mnakagawa/orgs","repos_url":"https://api.github.com/users/Mnakagawa/repos","events_url":"https://api.github.com/users/Mnakagawa/events{/privacy}","received_events_url":"https://api.github.com/users/Mnakagawa/received_events","type":"User","site_admin":false},"assignees":[{"login":"Mnakagawa","id":7106792,"avatar_url":"https://avatars.githubusercontent.com/u/7106792?v=3","gravatar_id":"","url":"https://api.github.com/users/Mnakagawa","html_url":"https://github.com/Mnakagawa","followers_url":"https://api.github.com/users/Mnakagawa/followers","following_url":"https://api.github.com/users/Mnakagawa/following{/other_user}","gists_url":"https://api.github.com/users/Mnakagawa/gists{/gist_id}","starred_url":"https://api.github.com/users/Mnakagawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mnakagawa/subscriptions","organizations_url":"https://api.github.com/users/Mnakagawa/orgs","repos_url":"https://api.github.com/users/Mnakagawa/repos","events_url":"https://api.github.com/users/Mnakagawa/events{/privacy}","received_events_url":"https://api.github.com/users/Mnakagawa/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/project-hatohol/hatohol/milestones/11","html_url":"https://github.com/project-hatohol/hatohol/milestones/16.12%20Mature%20release%20with%20the%20new%20UI","labels_url":"https://api.github.com/repos/project-hatohol/hatohol/milestones/11/labels","id":879247,"number":11,"title":"16.12 Mature release with the new UI","description":"","creator":{"login":"kz0817","id":2610513,"avatar_url":"https://avatars.githubusercontent.com/u/2610513?v=3","gravatar_id":"","url":"https://api.github.com/users/kz0817","html_url":"https://github.com/kz0817","followers_url":"https://api.github.com/users/kz0817/followers","following_url":"https://api.github.com/users/kz0817/following{/other_user}","gists_url":"https://api.github.com/users/kz0817/gists{/gist_id}","starred_url":"https://api.github.com/users/kz0817/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kz0817/subscriptions","organizations_url":"https://api.github.com/users/kz0817/orgs","repos_url":"https://api.github.com/users/kz0817/repos","events_url":"https://api.github.com/users/kz0817/events{/privacy}","received_events_url":"https://api.github.com/users/kz0817/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":1,"state":"open","created_at":"2014-11-25T01:24:12Z","updated_at":"2016-11-28T04:38:18Z","due_on":"2016-12-21T15:00:00Z","closed_at":null},"comments":4,"created_at":"2016-11-28T00:51:03Z","updated_at":"2016-12-01T12:28:18Z","closed_at":null,"body":"#2370 でhap2_nagios_ndoutils.pyが修正されている理由を教えてください。\r\n単に考慮漏れですか？\r\n\r\nまた、__get_latest_statehistory_id()は0を返さないですよね？\r\nMySQLがそうだから。\r\n\r\nでも、None or integerを返す関数で、Noneの場合を調べる一般的な方法は、\r\n    if not raw_last_info:\r\nよりも\r\n    if raw_last_info is None:\r\nでしょうね。(0が返った時の振る舞いが異なる）\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/project-hatohol/hatohol/issues/comments/264161541","html_url":"https://github.com/project-hatohol/hatohol/issues/2388#issuecomment-264161541","issue_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/2388","id":264161541,"user":{"login":"kz0817","id":2610513,"avatar_url":"https://avatars.githubusercontent.com/u/2610513?v=3","gravatar_id":"","url":"https://api.github.com/users/kz0817","html_url":"https://github.com/kz0817","followers_url":"https://api.github.com/users/kz0817/followers","following_url":"https://api.github.com/users/kz0817/following{/other_user}","gists_url":"https://api.github.com/users/kz0817/gists{/gist_id}","starred_url":"https://api.github.com/users/kz0817/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kz0817/subscriptions","organizations_url":"https://api.github.com/users/kz0817/orgs","repos_url":"https://api.github.com/users/kz0817/repos","events_url":"https://api.github.com/users/kz0817/events{/privacy}","received_events_url":"https://api.github.com/users/kz0817/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T12:28:18Z","updated_at":"2016-12-01T12:28:18Z","body":"度々の質問、失礼します。最後、returnしていますが、\r\nなぜ、処理を途中でやめるのですか？\r\nこの実装だと、ndoutilsからの情報の取得が次回のpolling時に\r\nなるように思えますが、その理解でよいですか？\r\n\r\n+            if not raw_last_info:\r\n+                latest_id = self.__get_latest_statehistory_id()\r\n+                if latest_id:\r\n+                    self.set_event_last_info(latest_id)\r\n+                else:\r\n+                    self.set_event_last_info(\"0\")\r\n+                return\r\n"}}
{"actor":{"display_login":"kz0817"}}