)]}'
{"designate/service.py":[{"author":{"_account_id":15171,"name":"Eric Larson","email":"eric.larson@rackspace.com","username":"elarson"},"change_message_id":"ef64036b65b38693cb60ec554edaf26b5a6e612f","unresolved":false,"context_lines":[{"line_number":256,"context_line":"                    port \u003d int(port)"},{"line_number":257,"context_line":"                except ValueError:"},{"line_number":258,"context_line":"                    LOG.exception(_LE(\u0027Invalid ip:port pair: %s\u0027), listen)"},{"line_number":259,"context_line":"                    raise"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"                self._start(host, port)"},{"line_number":262,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"dae33548_4e600dcf","line":259,"updated":"2016-02-15 17:48:26.000000000","message":"It seems worthwhile to go ahead and move this to a helper function. Maybe `listen_on_addresses` that returns the list?","commit_id":"411e57a91f8c690bbf5d1231fd1ad1960a4abc84"},{"author":{"_account_id":15171,"name":"Eric Larson","email":"eric.larson@rackspace.com","username":"elarson"},"change_message_id":"bf3fd0572ce29d41480d5704d313caa3ae89d2d7","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            self._service_config.api_host,"},{"line_number":204,"context_line":"            self._service_config.api_port,"},{"line_number":205,"context_line":"            9001,"},{"line_number":206,"context_line":"            self._service_config.listen)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        for address in addresses:"},{"line_number":209,"context_line":"            self._start(address[0], address[1])"}],"source_content_type":"text/x-python","patch_set":7,"id":"dae33548_5e51a80d","line":206,"updated":"2016-02-16 16:29:38.000000000","message":"Sorry, I don\u0027t think I was clear. I\u0027d keep all the logic rather than passing through the self._service._config vars. I\u0027d go ahead an hide that in the listen_on_addresses helper so you have one place to deprecate the algorithm and, hopefully, access to the variables as well. \n\nThat said, passing in the default port makes sense.","commit_id":"b50cdf92a3b0aabccabdb19732e29b1c90acbd60"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"1c292f2ee767710f35f5f8339c5f6deebe779fc8","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            self._service_config.api_host,"},{"line_number":204,"context_line":"            self._service_config.api_port,"},{"line_number":205,"context_line":"            9001,"},{"line_number":206,"context_line":"            self._service_config.listen)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        for address in addresses:"},{"line_number":209,"context_line":"            self._start(address[0], address[1])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_c2d01722","line":206,"in_reply_to":"dae33548_5e51a80d","updated":"2016-04-19 14:09:04.000000000","message":"Done, I think :)","commit_id":"b50cdf92a3b0aabccabdb19732e29b1c90acbd60"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"5b1dc8b9d7311df5e0ec282ac04d722006cc126a","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        super(Service, self).stop()"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def _listen_on_addresses(self, default_port):"},{"line_number":101,"context_line":"        \"\"\""},{"line_number":102,"context_line":"        Helper Method to handle migration from singular host/port to"},{"line_number":103,"context_line":"        multiple binds"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_8124abb2","line":100,"range":{"start_line":100,"start_character":0,"end_line":100,"end_character":49},"updated":"2016-05-03 13:36:01.000000000","message":"\"_listen_on_addresses\" sounds like the function is doing the .listen()","commit_id":"93e10a4f951e76acc5fa37f776e4edd3122b478d"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"727ca6a02c1d368e5079d5d6d1f6c6c194c8a507","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        super(Service, self).stop()"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def _listen_on_addresses(self, default_port):"},{"line_number":101,"context_line":"        \"\"\""},{"line_number":102,"context_line":"        Helper Method to handle migration from singular host/port to"},{"line_number":103,"context_line":"        multiple binds"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_bc7efc67","line":100,"range":{"start_line":100,"start_character":0,"end_line":100,"end_character":49},"in_reply_to":"1a122d0e_8124abb2","updated":"2016-05-04 13:33:38.000000000","message":"Done","commit_id":"93e10a4f951e76acc5fa37f776e4edd3122b478d"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"5b1dc8b9d7311df5e0ec282ac04d722006cc126a","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        else:"},{"line_number":125,"context_line":"            def _split_host_port(l):"},{"line_number":126,"context_line":"                try:"},{"line_number":127,"context_line":"                    host, port \u003d l.split(\u0027:\u0027, 2)"},{"line_number":128,"context_line":"                    return host, int(port)"},{"line_number":129,"context_line":"                except ValueError:"},{"line_number":130,"context_line":"                    LOG.exception(_LE(\u0027Invalid ip:port pair: %s\u0027), l)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_262b2d96","line":127,"range":{"start_line":127,"start_character":20,"end_line":127,"end_character":48},"updated":"2016-05-03 13:36:01.000000000","message":"\"2\" should be \"1\" to split only once","commit_id":"93e10a4f951e76acc5fa37f776e4edd3122b478d"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"727ca6a02c1d368e5079d5d6d1f6c6c194c8a507","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        else:"},{"line_number":125,"context_line":"            def _split_host_port(l):"},{"line_number":126,"context_line":"                try:"},{"line_number":127,"context_line":"                    host, port \u003d l.split(\u0027:\u0027, 2)"},{"line_number":128,"context_line":"                    return host, int(port)"},{"line_number":129,"context_line":"                except ValueError:"},{"line_number":130,"context_line":"                    LOG.exception(_LE(\u0027Invalid ip:port pair: %s\u0027), l)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_dca49809","line":127,"range":{"start_line":127,"start_character":20,"end_line":127,"end_character":48},"in_reply_to":"1a122d0e_262b2d96","updated":"2016-05-04 13:33:38.000000000","message":"Done","commit_id":"93e10a4f951e76acc5fa37f776e4edd3122b478d"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"5b1dc8b9d7311df5e0ec282ac04d722006cc126a","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        addresses \u003d self._listen_on_addresses(9001)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        for address in addresses:"},{"line_number":232,"context_line":"            self._start(address[0], address[1])"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def _start(self, host, port):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a122d0e_4133b3f6","line":231,"range":{"start_line":231,"start_character":12,"end_line":231,"end_character":19},"updated":"2016-05-03 13:36:01.000000000","message":"s/address/address_port/  maybe?","commit_id":"93e10a4f951e76acc5fa37f776e4edd3122b478d"},{"author":{"_account_id":15171,"name":"Eric Larson","email":"eric.larson@rackspace.com","username":"elarson"},"change_message_id":"132f7b662b98a54daf2875904c66673f29b633b4","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        else:"},{"line_number":125,"context_line":"            def _split_host_port(l):"},{"line_number":126,"context_line":"                try:"},{"line_number":127,"context_line":"                    host, port \u003d l.split(\u0027:\u0027, 1)"},{"line_number":128,"context_line":"                    return host, int(port)"},{"line_number":129,"context_line":"                except ValueError:"},{"line_number":130,"context_line":"                    LOG.exception(_LE(\u0027Invalid ip:port pair: %s\u0027), l)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_d70bd37b","line":127,"updated":"2016-05-04 13:58:11.000000000","message":"So federico got me thinking about this. I\u0027d almost argue that it should be l.split(\u0027:\u0027) without the boundary. That way, if someone does something wrong like \"foo:bar:9000\" you\u0027ll get a ValueError for too many values to unpack.","commit_id":"82fcd5438e8c1dcb95e3d83fe185857366070812"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"1111519b354c9ba7b70a1705d4aed3cd192a76b0","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        else:"},{"line_number":125,"context_line":"            def _split_host_port(l):"},{"line_number":126,"context_line":"                try:"},{"line_number":127,"context_line":"                    host, port \u003d l.split(\u0027:\u0027, 1)"},{"line_number":128,"context_line":"                    return host, int(port)"},{"line_number":129,"context_line":"                except ValueError:"},{"line_number":130,"context_line":"                    LOG.exception(_LE(\u0027Invalid ip:port pair: %s\u0027), l)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_52ad1187","line":127,"in_reply_to":"1a122d0e_325055d4","updated":"2016-05-04 14:07:18.000000000","message":"Nope :) We want to catch too few values too, e.g. with:\n\n    \u003e\u003e\u003e bla \u003d \"foo9001\"\n    \u003e\u003e\u003e host, port \u003d bla.split(\u0027:\u0027, 1)\n    Traceback (most recent call last):\n      File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    ValueError: need more than 1 value to unpack\n    \u003e\u003e\u003e","commit_id":"82fcd5438e8c1dcb95e3d83fe185857366070812"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"c79cf283352be3514ee78deedae95d73d65ead95","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        else:"},{"line_number":125,"context_line":"            def _split_host_port(l):"},{"line_number":126,"context_line":"                try:"},{"line_number":127,"context_line":"                    host, port \u003d l.split(\u0027:\u0027, 1)"},{"line_number":128,"context_line":"                    return host, int(port)"},{"line_number":129,"context_line":"                except ValueError:"},{"line_number":130,"context_line":"                    LOG.exception(_LE(\u0027Invalid ip:port pair: %s\u0027), l)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_72848d5c","line":127,"in_reply_to":"1a122d0e_524b5159","updated":"2016-05-04 14:02:24.000000000","message":"\u003e\u003e\u003e bla \u003d \"foo:9001\"\n\u003e\u003e\u003e host, port \u003d bla.split(\u0027:\u0027, 1)\n\u003e\u003e\u003e host\n\u0027foo\u0027\n\u003e\u003e\u003e port\n\u00279001\u0027\n\u003e\u003e\u003e bla \u003d \"foo:bar:9001\"\n\u003e\u003e\u003e host, port \u003d bla.split(\u0027:\u0027, 1)\n\u003e\u003e\u003e host\n\u0027foo\u0027\n\u003e\u003e\u003e port\n\u0027bar:9001\u0027\n\u003e\u003e\u003e int(port)\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nValueError: invalid literal for int() with base 10: \u0027bar:9001\u0027","commit_id":"82fcd5438e8c1dcb95e3d83fe185857366070812"},{"author":{"_account_id":15171,"name":"Eric Larson","email":"eric.larson@rackspace.com","username":"elarson"},"change_message_id":"05af8282d5ed5c26e162504d532112c55bd67dde","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        else:"},{"line_number":125,"context_line":"            def _split_host_port(l):"},{"line_number":126,"context_line":"                try:"},{"line_number":127,"context_line":"                    host, port \u003d l.split(\u0027:\u0027, 1)"},{"line_number":128,"context_line":"                    return host, int(port)"},{"line_number":129,"context_line":"                except ValueError:"},{"line_number":130,"context_line":"                    LOG.exception(_LE(\u0027Invalid ip:port pair: %s\u0027), l)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_4de73440","line":127,"in_reply_to":"1a122d0e_52ad1187","updated":"2016-05-04 14:19:56.000000000","message":"Indeed! I\u0027m sold!","commit_id":"82fcd5438e8c1dcb95e3d83fe185857366070812"},{"author":{"_account_id":15171,"name":"Eric Larson","email":"eric.larson@rackspace.com","username":"elarson"},"change_message_id":"4d382f49d66572e8491a73f8a8b20e71178b6f19","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        else:"},{"line_number":125,"context_line":"            def _split_host_port(l):"},{"line_number":126,"context_line":"                try:"},{"line_number":127,"context_line":"                    host, port \u003d l.split(\u0027:\u0027, 1)"},{"line_number":128,"context_line":"                    return host, int(port)"},{"line_number":129,"context_line":"                except ValueError:"},{"line_number":130,"context_line":"                    LOG.exception(_LE(\u0027Invalid ip:port pair: %s\u0027), l)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_325055d4","line":127,"in_reply_to":"1a122d0e_72848d5c","updated":"2016-05-04 14:05:11.000000000","message":"That makes sense. You limit the possibility of raising the exception when you try to convert the type. Of course, that means you could move the split out of try / except!\n\n;)","commit_id":"82fcd5438e8c1dcb95e3d83fe185857366070812"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"5e4c78e0b73425871514c8072301a051c3fca8a0","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        else:"},{"line_number":125,"context_line":"            def _split_host_port(l):"},{"line_number":126,"context_line":"                try:"},{"line_number":127,"context_line":"                    host, port \u003d l.split(\u0027:\u0027, 1)"},{"line_number":128,"context_line":"                    return host, int(port)"},{"line_number":129,"context_line":"                except ValueError:"},{"line_number":130,"context_line":"                    LOG.exception(_LE(\u0027Invalid ip:port pair: %s\u0027), l)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a122d0e_524b5159","line":127,"in_reply_to":"1a122d0e_d70bd37b","updated":"2016-05-04 14:01:15.000000000","message":"This will actually happen already :) if you supply \"foo:bar:9000\", we\u0027ll hit the except block below and log+re raise the exception.","commit_id":"82fcd5438e8c1dcb95e3d83fe185857366070812"}]}
