)]}'
{"swift/cli/recon.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cda6d7a44d03019913a5d7b713fce1fc6f0bdf8","unresolved":false,"context_lines":[{"line_number":935,"context_line":"                    except TypeError:"},{"line_number":936,"context_line":"                        return None"},{"line_number":937,"context_line":"                except TypeError:"},{"line_number":938,"context_line":"                    return None"},{"line_number":939,"context_line":"                suffix \u003d \u0027-\u0027 + str(idx) if idx !\u003d 0 else \u0027\u0027"},{"line_number":940,"context_line":"                ring_names \u003d [\u0027object\u0027 + suffix]"},{"line_number":941,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_b4eb2e78","line":938,"updated":"2016-02-09 00:29:27.000000000","message":"oh, i missed these sneaky guard returns - I guess the docstring warns you can get a list or None - but, I think there\u0027s maybe some good reason to have it always return a list (possibly empty).\n\nAnother option would be to have it raise some sort of exception on error.  Using None to indicate an \"error\" isn\u0027t generally that friendly.  On some python lookup interfaces you have \"return None/-1 if not found\" - but most of the time that\u0027s less handy (__getitem__ raises KeyError, dict.get(key, default\u003dNone) isn\u0027t that useful as construct onto itself without the default kwarg; which is there so you can ensure that asking for a key that\u0027s missing will return *something* that\u0027s the same *type* as the value of what you would expect to be at that key if it was there)\n\nhaving to always say `if \u003clist\u003e is None` before you can use the list you expect this method to return is just asking to violate \"Errors should never pass silently\" - OTOH, it\u0027s maybe only marginally better than `if not rings` so idk.  One type for return value is better, not raising an exception dunno.","commit_id":"b8782398ed7a03b9a035c88dd1bf7cfdf6010730"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cda6d7a44d03019913a5d7b713fce1fc6f0bdf8","unresolved":false,"context_lines":[{"line_number":940,"context_line":"                ring_names \u003d [\u0027object\u0027 + suffix]"},{"line_number":941,"context_line":"            else:"},{"line_number":942,"context_line":"                ring_names \u003d [\u0027object\u0027] + [\u0027object-\u0027 + str(i)"},{"line_number":943,"context_line":"                                           for i in range(1, len(POLICIES))]"},{"line_number":944,"context_line":"        else:"},{"line_number":945,"context_line":"            ring_names \u003d [self.server_type]"},{"line_number":946,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_02ef691e","line":943,"updated":"2016-02-09 00:29:27.000000000","message":"policies have .ring_name attribute\n\nmight be ok in a list comprehension, but the \"name or index\" condition makes it a little gnarly - maybe better to unroll it [1]\n\n1. https://gist.github.com/clayg/f70dd68cdfdcdfe16fbb#file-for_bartz-patch-L26","commit_id":"b8782398ed7a03b9a035c88dd1bf7cfdf6010730"}],"test/unit/cli/test_recon.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cda6d7a44d03019913a5d7b713fce1fc6f0bdf8","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            \u0027\u0027.join(random.choice(string.digits) for x in range(6)))"},{"line_number":146,"context_line":"        self.tmpfile_name \u003d \"%s/%s.ring.gz\" % (self.swift_dir, self.ring_name)"},{"line_number":147,"context_line":"        self.ring_name2 \u003d \"test_object_%s\" % ("},{"line_number":148,"context_line":"            \u0027\u0027.join(random.choice(string.digits) for x in range(6)))"},{"line_number":149,"context_line":"        self.tmpfile_name2 \u003d \"%s/%s.ring.gz\" % (self.swift_dir,"},{"line_number":150,"context_line":"                                                self.ring_name2)"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_62c73d96","line":148,"updated":"2016-02-09 00:29:27.000000000","message":"maybe just random.randint?","commit_id":"b8782398ed7a03b9a035c88dd1bf7cfdf6010730"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cda6d7a44d03019913a5d7b713fce1fc6f0bdf8","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        ips \u003d self.recon_instance.get_devices("},{"line_number":255,"context_line":"            0, 1, self.swift_dir, [self.ring_name, self.ring_name2])"},{"line_number":256,"context_line":"        self.assertEqual(set([(\u0027127.0.0.1\u0027, 10001),"},{"line_number":257,"context_line":"                              (\u0027127.0.0.2\u0027, 10004)]), ips)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def test_get_ringmd5(self):"},{"line_number":260,"context_line":"        for server_type in (\u0027account\u0027, \u0027container\u0027, \u0027object\u0027, \u0027object-1\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_df80434c","line":257,"updated":"2016-02-09 00:29:27.000000000","message":"good explicit tests of get_devices","commit_id":"b8782398ed7a03b9a035c88dd1bf7cfdf6010730"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0cda6d7a44d03019913a5d7b713fce1fc6f0bdf8","unresolved":false,"context_lines":[{"line_number":408,"context_line":"            self.assertEqual(self.recon_instance._get_ring_names(\u00273\u0027), None)"},{"line_number":409,"context_line":"            self.assertEqual(self.recon_instance._get_ring_names(\u0027wrong\u0027),"},{"line_number":410,"context_line":"                             None)"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"class TestReconCommands(unittest.TestCase):"},{"line_number":414,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_9fa3ab00","line":411,"updated":"2016-02-09 00:29:27.000000000","message":"good explicit tests of the new _get_ring_names method","commit_id":"b8782398ed7a03b9a035c88dd1bf7cfdf6010730"}]}
