)]}'
{"bin/glance":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"e9145572016cf070b90ddeb7413b13b04797bd43","unresolved":false,"context_lines":[{"line_number":29,"context_line":"import sys"},{"line_number":30,"context_line":"import time"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from glance.common import exception"},{"line_number":33,"context_line":"from urlparse import urlparse"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# If ../glance/__init__.py exists, add ../ to Python search path, so that"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAEn%2F%2F6GQ%3D","line":32,"updated":"2012-02-16 03:02:55.000000000","message":"This is a dupe, it\u0027s already present just below...","commit_id":"336bb3a5c0825e05a4fda021f318eacb42c2d672"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"8566c9e46dcf36ec4c2be8aba3775c7366fe2837","unresolved":false,"context_lines":[{"line_number":29,"context_line":"import sys"},{"line_number":30,"context_line":"import time"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from glance.common import exception"},{"line_number":33,"context_line":"from urlparse import urlparse"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# If ../glance/__init__.py exists, add ../ to Python search path, so that"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAEn%2F%2F6B8%3D","line":32,"in_reply_to":"AAAAEn%2F%2F6GQ%3D","updated":"2012-02-16 10:28:32.000000000","message":"Good spot, fixed.","commit_id":"336bb3a5c0825e05a4fda021f318eacb42c2d672"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ad33604d84433a20db998ebe28d4bb1168473df6","unresolved":false,"context_lines":[{"line_number":752,"context_line":"    if creds[\u0027strategy\u0027] \u003d\u003d \u0027keystone\u0027 and not creds[\u0027auth_url\u0027]:"},{"line_number":753,"context_line":"        msg \u003d (\"--auth_url option or OS_AUTH_URL environment variable \""},{"line_number":754,"context_line":"               \"required when keystone authentication strategy is enabled\\n\")"},{"line_number":755,"context_line":"        raise ClientConfigurationError(msg)"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"    use_ssl \u003d (options.use_ssl or ("},{"line_number":758,"context_line":"        creds[\u0027auth_url\u0027] is not None and"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAEn%2F%2F6Hw%3D","line":755,"updated":"2012-02-16 01:05:56.000000000","message":"needs to be exception.ClientConfigurationError, right?","commit_id":"336bb3a5c0825e05a4fda021f318eacb42c2d672"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"8566c9e46dcf36ec4c2be8aba3775c7366fe2837","unresolved":false,"context_lines":[{"line_number":752,"context_line":"    if creds[\u0027strategy\u0027] \u003d\u003d \u0027keystone\u0027 and not creds[\u0027auth_url\u0027]:"},{"line_number":753,"context_line":"        msg \u003d (\"--auth_url option or OS_AUTH_URL environment variable \""},{"line_number":754,"context_line":"               \"required when keystone authentication strategy is enabled\\n\")"},{"line_number":755,"context_line":"        raise ClientConfigurationError(msg)"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"    use_ssl \u003d (options.use_ssl or ("},{"line_number":758,"context_line":"        creds[\u0027auth_url\u0027] is not None and"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAEn%2F%2F6B4%3D","line":755,"in_reply_to":"AAAAEn%2F%2F6Hw%3D","updated":"2012-02-16 10:28:32.000000000","message":"Yep, fixed.","commit_id":"336bb3a5c0825e05a4fda021f318eacb42c2d672"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"e9145572016cf070b90ddeb7413b13b04797bd43","unresolved":false,"context_lines":[{"line_number":984,"context_line":"            print \"Completed in %-0.4f sec.\" % (end_time - start_time)"},{"line_number":985,"context_line":"        sys.exit(result)"},{"line_number":986,"context_line":"    except (RuntimeError, NotImplementedError), e:"},{"line_number":987,"context_line":"        print \"ERROR: \", e"},{"line_number":988,"context_line":"    except exception.ClientConfigurationError, e:"},{"line_number":989,"context_line":"        parser.print_usage()"},{"line_number":990,"context_line":"        sys.stdout.write(msg)"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAEn%2F%2F6GE%3D","line":987,"updated":"2012-02-16 03:02:55.000000000","message":"I know it isn\u0027t part of this fix, but there should be a sys.exit(1) or something here too...","commit_id":"336bb3a5c0825e05a4fda021f318eacb42c2d672"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"8566c9e46dcf36ec4c2be8aba3775c7366fe2837","unresolved":false,"context_lines":[{"line_number":984,"context_line":"            print \"Completed in %-0.4f sec.\" % (end_time - start_time)"},{"line_number":985,"context_line":"        sys.exit(result)"},{"line_number":986,"context_line":"    except (RuntimeError, NotImplementedError), e:"},{"line_number":987,"context_line":"        print \"ERROR: \", e"},{"line_number":988,"context_line":"    except exception.ClientConfigurationError, e:"},{"line_number":989,"context_line":"        parser.print_usage()"},{"line_number":990,"context_line":"        sys.stdout.write(msg)"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAEn%2F%2F6B0%3D","line":987,"in_reply_to":"AAAAEn%2F%2F6GE%3D","updated":"2012-02-16 10:28:32.000000000","message":"I\u0027ve consolidated the two except clauses, so that the same error handling logic (including the exit) is applied in both cases.","commit_id":"336bb3a5c0825e05a4fda021f318eacb42c2d672"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"e9145572016cf070b90ddeb7413b13b04797bd43","unresolved":false,"context_lines":[{"line_number":985,"context_line":"        sys.exit(result)"},{"line_number":986,"context_line":"    except (RuntimeError, NotImplementedError), e:"},{"line_number":987,"context_line":"        print \"ERROR: \", e"},{"line_number":988,"context_line":"    except exception.ClientConfigurationError, e:"},{"line_number":989,"context_line":"        parser.print_usage()"},{"line_number":990,"context_line":"        sys.stdout.write(msg)"},{"line_number":991,"context_line":"        sys.exit(1)"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAEn%2F%2F6Fs%3D","line":988,"updated":"2012-02-16 03:02:55.000000000","message":"This exception is actually caught by the catch_error decorator and is never seen here.","commit_id":"336bb3a5c0825e05a4fda021f318eacb42c2d672"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"8566c9e46dcf36ec4c2be8aba3775c7366fe2837","unresolved":false,"context_lines":[{"line_number":985,"context_line":"        sys.exit(result)"},{"line_number":986,"context_line":"    except (RuntimeError, NotImplementedError), e:"},{"line_number":987,"context_line":"        print \"ERROR: \", e"},{"line_number":988,"context_line":"    except exception.ClientConfigurationError, e:"},{"line_number":989,"context_line":"        parser.print_usage()"},{"line_number":990,"context_line":"        sys.stdout.write(msg)"},{"line_number":991,"context_line":"        sys.exit(1)"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAEn%2F%2F6Bo%3D","line":988,"in_reply_to":"AAAAEn%2F%2F6Fs%3D","updated":"2012-02-16 10:28:32.000000000","message":"Yep, good catch.\n\nIt turns out that @catch_error only decorates a subset of the command methods, and some other tests depend on the alternate error handling path.\n\nSo I\u0027ve modified the catch_error decorator to re-throw ClientConfigurationException, so that this exception is always caught in main regardless of whether the decorator was applied to the current command method or not.\n\nThis approach has the advantage that the parser is available for print_usage, which wouldn\u0027t be in scope within the decorator.","commit_id":"336bb3a5c0825e05a4fda021f318eacb42c2d672"}],"glance/common/exception.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"600409d482073ddc6acda532a9c68311f3c98aa4","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        super(ClientConfigurationError, self).__init__(*args, **kwargs)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def __str__(self):"},{"line_number":133,"context_line":"        return self.message"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"class MultipleChoices(GlanceException):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAEn%2F%2F6BU%3D","line":133,"updated":"2012-02-16 11:25:43.000000000","message":"You only need to do the following:\n\n class ClientConfigurationError(GlanceException):\n     message \u003d _(\"There was an error configuring the client.\")\n\nThe base GlanceException class\u0027 __str__ method will automatically handle any args passed to the constructor and append those args as details to the error message.","commit_id":"ffa5fd97734f495df00f050842a8fa21036c50d5"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"cea523a6ce8fe95c51d8bb12ce7a48ab2e5edad4","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        super(ClientConfigurationError, self).__init__(*args, **kwargs)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def __str__(self):"},{"line_number":133,"context_line":"        return self.message"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"class MultipleChoices(GlanceException):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAEn%2F%2F6BA%3D","line":133,"in_reply_to":"AAAAEn%2F%2F6BU%3D","updated":"2012-02-16 11:32:26.000000000","message":"A-ha, neat!\n\nFixed now.","commit_id":"ffa5fd97734f495df00f050842a8fa21036c50d5"}]}
