)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"8ea0adc49547288ec20a44a79f1df559038ba6d2","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Angus Lees \u003cgus@inodes.org\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-12 13:08:21 +1000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make Daemon pidfile arg optional"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some uses of Daemon don\u0027t need a pidfile (eg: privsep)."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa32b979_be8180fd","line":7,"updated":"2015-06-22 19:39:00.000000000","message":"PEDANTIC: the pidfile arg isn\u0027t optional. You\u0027ve just made it \u0027Noneable\u0027. You could actually make it optional and then solve the annoyance of passing None in for the unit test...","commit_id":"995fc06e80fb94a68b488e507436c26a5c6641c7"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"217377068f55ea881ca674c28cbac004ae68bd19","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Angus Lees \u003cgus@inodes.org\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-24 08:21:15 +1000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make Daemon pidfile arg optional"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some uses of Daemon don\u0027t need a pidfile (eg: privsep)."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa32b979_a9c6da99","line":7,"updated":"2015-06-24 08:52:22.000000000","message":"It doesn\u0027t feel optional! :)","commit_id":"9a55cee1803363d7b804ee5fb1c2986619767a45"}],"neutron/agent/linux/daemon.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0106106f6785db23cfaaf37023dbf49d7365b91f","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            self.pidfile.write(os.getpid())"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def delete_pid(self):"},{"line_number":213,"context_line":"        if self.pidfile is not None:"},{"line_number":214,"context_line":"            os.remove(str(self.pidfile))"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def handle_sigterm(self, signum, frame):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_2a42ad68","line":213,"updated":"2015-06-10 00:50:05.000000000","message":"do you think this conditional is necessary? the registration of this function only seems to be called if self.pidfile is set","commit_id":"ff02497ef952aeacce28c47aeb0de021aa0dfc12"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"94469d95bbc47ad18378563a75fe8cad5c21ec61","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            self.pidfile.write(os.getpid())"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def delete_pid(self):"},{"line_number":213,"context_line":"        if self.pidfile is not None:"},{"line_number":214,"context_line":"            os.remove(str(self.pidfile))"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def handle_sigterm(self, signum, frame):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_0486c0da","line":213,"in_reply_to":"3afb71cf_2a42ad68","updated":"2015-06-10 04:46:19.000000000","message":"+1","commit_id":"ff02497ef952aeacce28c47aeb0de021aa0dfc12"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"ce8848b157a784da093aa149e862f950ca2688fe","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    Usage: subclass the Daemon class and override the run() method"},{"line_number":159,"context_line":"    \"\"\""},{"line_number":160,"context_line":"    def __init__(self, pidfile\u003dNone, stdin\u003dDEVNULL, stdout\u003dDEVNULL,"},{"line_number":161,"context_line":"                 stderr\u003dDEVNULL, procname\u003d\u0027python\u0027, uuid\u003dNone,"},{"line_number":162,"context_line":"                 user\u003dNone, group\u003dNone, watch_log\u003dTrue):"},{"line_number":163,"context_line":"        self.stdin \u003d stdin"}],"source_content_type":"text/x-python","patch_set":5,"id":"1af86dd1_f72548ae","line":160,"updated":"2015-06-11 23:11:17.000000000","message":"This default feels a little funny.  Wondering if we should make it so that one has to explicitly indicate they do not want a pidfile.  Thoughts?","commit_id":"6b43e211c06b9b1491871dd41b9e945159e51289"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"f24ee9cf441d7c5b6aa0954b0af638ad68d93b5b","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    Usage: subclass the Daemon class and override the run() method"},{"line_number":159,"context_line":"    \"\"\""},{"line_number":160,"context_line":"    def __init__(self, pidfile\u003dNone, stdin\u003dDEVNULL, stdout\u003dDEVNULL,"},{"line_number":161,"context_line":"                 stderr\u003dDEVNULL, procname\u003d\u0027python\u0027, uuid\u003dNone,"},{"line_number":162,"context_line":"                 user\u003dNone, group\u003dNone, watch_log\u003dTrue):"},{"line_number":163,"context_line":"        self.stdin \u003d stdin"}],"source_content_type":"text/x-python","patch_set":5,"id":"1af86dd1_d235baf7","line":160,"in_reply_to":"1af86dd1_d2301aa1","updated":"2015-06-12 00:36:34.000000000","message":"I wouldn\u0027t say I care *strongly*, but I did have the same reaction as Mark.","commit_id":"6b43e211c06b9b1491871dd41b9e945159e51289"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"d0f434ba40bcdf8a0dda2a2d3ceb962d5a7c47cf","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    Usage: subclass the Daemon class and override the run() method"},{"line_number":159,"context_line":"    \"\"\""},{"line_number":160,"context_line":"    def __init__(self, pidfile\u003dNone, stdin\u003dDEVNULL, stdout\u003dDEVNULL,"},{"line_number":161,"context_line":"                 stderr\u003dDEVNULL, procname\u003d\u0027python\u0027, uuid\u003dNone,"},{"line_number":162,"context_line":"                 user\u003dNone, group\u003dNone, watch_log\u003dTrue):"},{"line_number":163,"context_line":"        self.stdin \u003d stdin"}],"source_content_type":"text/x-python","patch_set":5,"id":"1af86dd1_efd7ac21","line":160,"in_reply_to":"1af86dd1_d235baf7","updated":"2015-06-12 03:10:10.000000000","message":"Good enough for me, changed.\n\nI added a trivial unittest too, because it\u0027s now much less clear that Daemon(None) should work.","commit_id":"6b43e211c06b9b1491871dd41b9e945159e51289"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"89654afbb729303e4f840970ce6d0ca1366b98b1","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    Usage: subclass the Daemon class and override the run() method"},{"line_number":159,"context_line":"    \"\"\""},{"line_number":160,"context_line":"    def __init__(self, pidfile\u003dNone, stdin\u003dDEVNULL, stdout\u003dDEVNULL,"},{"line_number":161,"context_line":"                 stderr\u003dDEVNULL, procname\u003d\u0027python\u0027, uuid\u003dNone,"},{"line_number":162,"context_line":"                 user\u003dNone, group\u003dNone, watch_log\u003dTrue):"},{"line_number":163,"context_line":"        self.stdin \u003d stdin"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_8520e09c","line":160,"in_reply_to":"1af86dd1_efd7ac21","updated":"2015-06-22 22:48:58.000000000","message":"Daemon(pidfile\u003dNone) is clear. In Python 2.x this is a social contract (asking the caller to use named args), but in Python 3 we can enforce it.","commit_id":"6b43e211c06b9b1491871dd41b9e945159e51289"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"fa06327c375d3a221745747b35e19d11f6e2d577","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    Usage: subclass the Daemon class and override the run() method"},{"line_number":159,"context_line":"    \"\"\""},{"line_number":160,"context_line":"    def __init__(self, pidfile\u003dNone, stdin\u003dDEVNULL, stdout\u003dDEVNULL,"},{"line_number":161,"context_line":"                 stderr\u003dDEVNULL, procname\u003d\u0027python\u0027, uuid\u003dNone,"},{"line_number":162,"context_line":"                 user\u003dNone, group\u003dNone, watch_log\u003dTrue):"},{"line_number":163,"context_line":"        self.stdin \u003d stdin"}],"source_content_type":"text/x-python","patch_set":5,"id":"1af86dd1_d2301aa1","line":160,"in_reply_to":"1af86dd1_f72548ae","updated":"2015-06-12 00:02:47.000000000","message":"I don\u0027t think I have a preference either way..\n\nAnyone care to state the above strongly enough for me to type a new revision?","commit_id":"6b43e211c06b9b1491871dd41b9e945159e51289"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"7346c2b91747c5b38f76e34ab77624d31e4dd115","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        os.dup2(stderr.fileno(), sys.stderr.fileno())"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        if self.pidfile is not None:"},{"line_number":208,"context_line":"            # write pidfile"},{"line_number":209,"context_line":"            atexit.register(self.delete_pid)"},{"line_number":210,"context_line":"            signal.signal(signal.SIGTERM, self.handle_sigterm)"},{"line_number":211,"context_line":"            self.pidfile.write(os.getpid())"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_ca488530","line":208,"updated":"2015-06-14 14:04:14.000000000","message":"super nit: I\u0027d take the chance to separate this to another function \"_write_pidfile\" ? :)","commit_id":"995fc06e80fb94a68b488e507436c26a5c6641c7"}],"neutron/tests/unit/agent/linux/test_daemon.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3e61fc563222dc4c038a4e640bc7eab154458f44","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        self.assertEqual(d.procname, \u0027python\u0027)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def test_init_nopidfile(self):"},{"line_number":227,"context_line":"        d \u003d daemon.Daemon(None)"},{"line_number":228,"context_line":"        self.assertFalse(self.pidfile.called)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def test_fork_parent(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_b63fb224","line":227,"updated":"2015-06-14 05:11:11.000000000","message":"You should change how to test or use \"# noqa\" at the end of line because pep8 error happened because of \"d\" isn\u0027t used.","commit_id":"995fc06e80fb94a68b488e507436c26a5c6641c7"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8b97e848589cc0f24da4724dd6e41d718d3e6259","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        self.assertEqual(d.procname, \u0027python\u0027)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def test_init_nopidfile(self):"},{"line_number":227,"context_line":"        d \u003d daemon.Daemon(None)"},{"line_number":228,"context_line":"        self.assertFalse(self.pidfile.called)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def test_fork_parent(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_e51fba59","line":227,"in_reply_to":"fa32b979_b63fb224","updated":"2015-06-14 15:42:38.000000000","message":"You can just remove d. \n\nAlso, I would like to see the argument named here, since naked None/False/True/[]/etc arguments make for badly readable code. Even though this is test code, readability helps.","commit_id":"995fc06e80fb94a68b488e507436c26a5c6641c7"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"a048cc937b2a6090ce062b13501da54f4c93543b","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        self.assertEqual(d.procname, \u0027python\u0027)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def test_init_nopidfile(self):"},{"line_number":227,"context_line":"        d \u003d daemon.Daemon(None)"},{"line_number":228,"context_line":"        self.assertFalse(self.pidfile.called)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def test_fork_parent(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_e556da05","line":227,"in_reply_to":"fa32b979_e51fba59","updated":"2015-06-14 15:45:18.000000000","message":"Actually, don\u0027t remove d. Check that a daemon is created.","commit_id":"995fc06e80fb94a68b488e507436c26a5c6641c7"}]}
