)]}'
{"glance/common/client.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"36c9440e3a2087e1c39bf9bffbd2287d5326fff7","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                if redirect.url is None:"},{"line_number":69,"context_line":"                    raise exception.InvalidRedirect()"},{"line_number":70,"context_line":"                args[0].configure_from_url(redirect.url)"},{"line_number":71,"context_line":"                args[2] \u003d redirect.path"},{"line_number":72,"context_line":"        raise exception.MaxRedirectsExceeded(redirects\u003dMAX_REDIRECTS)"},{"line_number":73,"context_line":"    return wrapped"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F65I%3D","line":71,"updated":"2011-10-24 21:49:47.000000000","message":"Hey, could you use some local variables with descriptive names instead of args[0] and args[2] above... just makes it easier to understand.","commit_id":"9fff45ae7fa5251bdbfb60d7be7a8a1d0acb3ee0"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"e4dc26bad290cea78c6940174c9ac97e19b0493c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        except exception.NotAuthorized:"},{"line_number":50,"context_line":"            args[0]._authenticate(force_reauth\u003dTrue)"},{"line_number":51,"context_line":"            return func(*args, **kwargs)"},{"line_number":52,"context_line":"    return wrapped"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def handle_redirects(func):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F6bg%3D","line":52,"updated":"2011-10-26 16:37:42.000000000","message":"I\u0027d prefer that you use a named \"self\" argument here, personally...","commit_id":"b1e66f8df3be31459572533020d31f3aec399732"},{"author":{"_account_id":706,"name":"Brian Lamar","email":"brian.lamar@rackspace.com","username":"blamar"},"change_message_id":"e506f0f1968c77f64d1813ffe7d4e59e18ebc7df","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        except exception.NotAuthorized:"},{"line_number":50,"context_line":"            args[0]._authenticate(force_reauth\u003dTrue)"},{"line_number":51,"context_line":"            return func(*args, **kwargs)"},{"line_number":52,"context_line":"    return wrapped"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def handle_redirects(func):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F5hQ%3D","line":52,"in_reply_to":"AAAACX%2F%2F6bg%3D","updated":"2011-10-31 21:20:46.000000000","message":"Sure, makes sense.","commit_id":"b1e66f8df3be31459572533020d31f3aec399732"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"e4dc26bad290cea78c6940174c9ac97e19b0493c","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            except exception.RedirectException as redirect:"},{"line_number":67,"context_line":"                if redirect.url is None:"},{"line_number":68,"context_line":"                    raise exception.InvalidRedirect()"},{"line_number":69,"context_line":"                self.configure_from_url(redirect.url)"},{"line_number":70,"context_line":"                path \u003d redirect.path"},{"line_number":71,"context_line":"        raise exception.MaxRedirectsExceeded(redirects\u003dMAX_REDIRECTS)"},{"line_number":72,"context_line":"    return wrapped"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F6bU%3D","line":69,"updated":"2011-10-26 16:37:42.000000000","message":"This bothers me a little bit, from the standpoint of future reuse of the client object.  Could you defend this a bit?","commit_id":"b1e66f8df3be31459572533020d31f3aec399732"},{"author":{"_account_id":706,"name":"Brian Lamar","email":"brian.lamar@rackspace.com","username":"blamar"},"change_message_id":"c92c24493870b9bdb380a6335d0f2875980af682","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            except exception.RedirectException as redirect:"},{"line_number":67,"context_line":"                if redirect.url is None:"},{"line_number":68,"context_line":"                    raise exception.InvalidRedirect()"},{"line_number":69,"context_line":"                self.configure_from_url(redirect.url)"},{"line_number":70,"context_line":"                path \u003d redirect.path"},{"line_number":71,"context_line":"        raise exception.MaxRedirectsExceeded(redirects\u003dMAX_REDIRECTS)"},{"line_number":72,"context_line":"    return wrapped"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F5gU%3D","line":69,"in_reply_to":"AAAACX%2F%2F5g4%3D","updated":"2011-10-31 21:23:42.000000000","message":"Ignore this, I see what you mean now! Thanks.","commit_id":"b1e66f8df3be31459572533020d31f3aec399732"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"2cdb0cb33c445e75eea2a06ed27a1b8f4e493fe7","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            except exception.RedirectException as redirect:"},{"line_number":67,"context_line":"                if redirect.url is None:"},{"line_number":68,"context_line":"                    raise exception.InvalidRedirect()"},{"line_number":69,"context_line":"                self.configure_from_url(redirect.url)"},{"line_number":70,"context_line":"                path \u003d redirect.path"},{"line_number":71,"context_line":"        raise exception.MaxRedirectsExceeded(redirects\u003dMAX_REDIRECTS)"},{"line_number":72,"context_line":"    return wrapped"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F5gA%3D","line":69,"in_reply_to":"AAAACX%2F%2F5g4%3D","updated":"2011-10-31 21:30:40.000000000","message":"Well, configure_from_url() modifies the attributes of the object.  In essence, if we get a redirect, we assume that all future accesses will be relative to the URL specified by the redirect, and it\u0027s not clear to me that that is the proper behavior.  Like I say, it bothers me a little...","commit_id":"b1e66f8df3be31459572533020d31f3aec399732"},{"author":{"_account_id":706,"name":"Brian Lamar","email":"brian.lamar@rackspace.com","username":"blamar"},"change_message_id":"bdff895d17a9e9d78edc6ec0b7f419a7b6b945a2","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            except exception.RedirectException as redirect:"},{"line_number":67,"context_line":"                if redirect.url is None:"},{"line_number":68,"context_line":"                    raise exception.InvalidRedirect()"},{"line_number":69,"context_line":"                self.configure_from_url(redirect.url)"},{"line_number":70,"context_line":"                path \u003d redirect.path"},{"line_number":71,"context_line":"        raise exception.MaxRedirectsExceeded(redirects\u003dMAX_REDIRECTS)"},{"line_number":72,"context_line":"    return wrapped"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F5fc%3D","line":69,"in_reply_to":"AAAACX%2F%2F5gA%3D","updated":"2011-10-31 21:47:43.000000000","message":"Thanks for the point here. I took \u0027reuse\u0027 to be \u0027programmatic reuse\u0027 and not \"What happens if I get redirected and then keep using the client to make further requests.\" Once I got that through my head I see this is absolutely a show-stopper. I have to head out for now but I\u0027ll tackle this tomorrow. Thanks!","commit_id":"b1e66f8df3be31459572533020d31f3aec399732"},{"author":{"_account_id":706,"name":"Brian Lamar","email":"brian.lamar@rackspace.com","username":"blamar"},"change_message_id":"e506f0f1968c77f64d1813ffe7d4e59e18ebc7df","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            except exception.RedirectException as redirect:"},{"line_number":67,"context_line":"                if redirect.url is None:"},{"line_number":68,"context_line":"                    raise exception.InvalidRedirect()"},{"line_number":69,"context_line":"                self.configure_from_url(redirect.url)"},{"line_number":70,"context_line":"                path \u003d redirect.path"},{"line_number":71,"context_line":"        raise exception.MaxRedirectsExceeded(redirects\u003dMAX_REDIRECTS)"},{"line_number":72,"context_line":"    return wrapped"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F5g4%3D","line":69,"in_reply_to":"AAAACX%2F%2F6bU%3D","updated":"2011-10-31 21:20:46.000000000","message":"I\u0027m not sure what you mean here. How can a decorator affect the reuse of the object it wraps? I feel more dirty in handle_unauthorized when calling a by-convention protected method whereas at least this is a by-convention public method.\n\nThis is going to break if the public interface of the client changes, but that should be able to be said about any other application/user of the client.","commit_id":"b1e66f8df3be31459572533020d31f3aec399732"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c5e8aeff158699e5b016d6739829922d82cda728","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                if redirect.url is None:"},{"line_number":68,"context_line":"                    raise exception.InvalidRedirect()"},{"line_number":69,"context_line":"                self.configure_from_url(redirect.url)"},{"line_number":70,"context_line":"                path \u003d redirect.path"},{"line_number":71,"context_line":"        raise exception.MaxRedirectsExceeded(redirects\u003dMAX_REDIRECTS)"},{"line_number":72,"context_line":"    return wrapped"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F64E%3D","line":70,"updated":"2011-10-25 14:49:53.000000000","message":"I don\u0027t see where you use this path variable... is it necessary?","commit_id":"b1e66f8df3be31459572533020d31f3aec399732"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"2cdb0cb33c445e75eea2a06ed27a1b8f4e493fe7","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                if redirect.url is None:"},{"line_number":68,"context_line":"                    raise exception.InvalidRedirect()"},{"line_number":69,"context_line":"                self.configure_from_url(redirect.url)"},{"line_number":70,"context_line":"                path \u003d redirect.path"},{"line_number":71,"context_line":"        raise exception.MaxRedirectsExceeded(redirects\u003dMAX_REDIRECTS)"},{"line_number":72,"context_line":"    return wrapped"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F5gE%3D","line":70,"in_reply_to":"AAAACX%2F%2F5hA%3D","updated":"2011-10-31 21:30:40.000000000","message":"Yep, I suggested adding a comment only because Jay didn\u0027t realize it was a loop, and because I had to read the code a couple of times before I spotted the loop and understood what you were doing.  It\u0027s a standard idiom, but for whatever reason, it reads as subtle, even though it isn\u0027t, really.","commit_id":"b1e66f8df3be31459572533020d31f3aec399732"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"e4dc26bad290cea78c6940174c9ac97e19b0493c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                if redirect.url is None:"},{"line_number":68,"context_line":"                    raise exception.InvalidRedirect()"},{"line_number":69,"context_line":"                self.configure_from_url(redirect.url)"},{"line_number":70,"context_line":"                path \u003d redirect.path"},{"line_number":71,"context_line":"        raise exception.MaxRedirectsExceeded(redirects\u003dMAX_REDIRECTS)"},{"line_number":72,"context_line":"    return wrapped"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F6bc%3D","line":70,"in_reply_to":"AAAACX%2F%2F64E%3D","updated":"2011-10-26 16:37:42.000000000","message":"Actually, it is; if func() raises a RedirectException, this causes it to be reinvoked with a different path during the subsequent attempt.  It would probably be worth inserting a comment to explain the logic, though.","commit_id":"b1e66f8df3be31459572533020d31f3aec399732"},{"author":{"_account_id":706,"name":"Brian Lamar","email":"brian.lamar@rackspace.com","username":"blamar"},"change_message_id":"e506f0f1968c77f64d1813ffe7d4e59e18ebc7df","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                if redirect.url is None:"},{"line_number":68,"context_line":"                    raise exception.InvalidRedirect()"},{"line_number":69,"context_line":"                self.configure_from_url(redirect.url)"},{"line_number":70,"context_line":"                path \u003d redirect.path"},{"line_number":71,"context_line":"        raise exception.MaxRedirectsExceeded(redirects\u003dMAX_REDIRECTS)"},{"line_number":72,"context_line":"    return wrapped"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F5hA%3D","line":70,"in_reply_to":"AAAACX%2F%2F6bc%3D","updated":"2011-10-31 21:20:46.000000000","message":"I\u0027ll add a comment if you guys think it would be worth it...however I\u0027d point out that it\u0027s  a loop and that setting a variable in a loop is fairly common IMO.","commit_id":"b1e66f8df3be31459572533020d31f3aec399732"}],"glance/common/exception.py":[{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"30820f1ce8dd7a5de88267d84cc04b0c5a5f3db6","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import urlparse"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class RedirectException(Exception):"},{"line_number":25,"context_line":"    def __init__(self, url):"},{"line_number":26,"context_line":"        parsed \u003d urlparse.urlparse(url)"},{"line_number":27,"context_line":"        self.url \u003d url"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F6qE%3D","line":24,"updated":"2011-10-25 21:28:07.000000000","message":"I wouldn\u0027t say I\u0027m exactly for this new exception class. I would love to class up GlanceException to provide access to the arguments like you have here.","commit_id":"b1e66f8df3be31459572533020d31f3aec399732"},{"author":{"_account_id":706,"name":"Brian Lamar","email":"brian.lamar@rackspace.com","username":"blamar"},"change_message_id":"e506f0f1968c77f64d1813ffe7d4e59e18ebc7df","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import urlparse"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class RedirectException(Exception):"},{"line_number":25,"context_line":"    def __init__(self, url):"},{"line_number":26,"context_line":"        parsed \u003d urlparse.urlparse(url)"},{"line_number":27,"context_line":"        self.url \u003d url"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F5gw%3D","line":24,"in_reply_to":"AAAACX%2F%2F6qE%3D","updated":"2011-10-31 21:20:46.000000000","message":"I was under the impression that GlanceException was just an exception with a translatable message. This isn\u0027t something that is going to be displayed ever, it\u0027s just used to catch/react-to certain situations.\n\nSuggestions for fixing? I could just inherit from GlanceException and then over-ride __init__? Then I guess I\u0027d have to make sure to set _error_string...Basically this just seemed like a \u0027new\u0027 case to me.","commit_id":"b1e66f8df3be31459572533020d31f3aec399732"}],"glance/tests/functional/test_client_redirects.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"73d72b978ea76a7a073f2615100035ab16d6b5d2","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        elif path \u003d\u003d \"/infinite_302\":"},{"line_number":66,"context_line":"            raise webob.exc.HTTPFound(location\u003drequest.url)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        elif path.startswith( \"/redirect-to\"):"},{"line_number":69,"context_line":"            url \u003d \"http://127.0.0.1:%s/success\" % path.split(\"-\")[-1]"},{"line_number":70,"context_line":"            raise webob.exc.HTTPFound(location\u003durl)"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAACX%2F%2F5VI%3D","line":68,"updated":"2011-11-01 20:37:24.000000000","message":"This seems to be what\u0027s bothering pylint...","commit_id":"9a6988b228e28b43ec9b7d9c87b55ad5cd376d3b"}]}
