)]}'
{"novaclient/client.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"48488c1d79dc3c03c2c8795de4dbfc1e7492f29b","unresolved":false,"context_lines":[{"line_number":376,"context_line":"    def _save_keys(self):"},{"line_number":377,"context_line":"        # Store the token/mgmt url in the keyring for later requests."},{"line_number":378,"context_line":"        if self.keyring_saver and self.os_cache and not self.keyring_saved \\"},{"line_number":379,"context_line":"          and self.auth_token and self.management_url and self.tenant_id:"},{"line_number":380,"context_line":"            self.keyring_saver.save(self.auth_token,"},{"line_number":381,"context_line":"                                    self.management_url,"},{"line_number":382,"context_line":"                                    self.tenant_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8wTo%3D","line":379,"updated":"2013-12-20 16:46:38.000000000","message":"Please use parentheses instead of backslashes to continue the condition.  You will also need to indent the second line of the condition four spaces beyond the indent for the code that follows, in order to provide visual differentiation…","commit_id":"1b9863c478f78354932a05ee739cce1259979d55"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"d3cb318e4d9e806a21ff73880d1aa15fdc5bfb62","unresolved":false,"context_lines":[{"line_number":376,"context_line":"    def _save_keys(self):"},{"line_number":377,"context_line":"        # Store the token/mgmt url in the keyring for later requests."},{"line_number":378,"context_line":"        if self.keyring_saver and self.os_cache and not self.keyring_saved \\"},{"line_number":379,"context_line":"          and self.auth_token and self.management_url and self.tenant_id:"},{"line_number":380,"context_line":"            self.keyring_saver.save(self.auth_token,"},{"line_number":381,"context_line":"                                    self.management_url,"},{"line_number":382,"context_line":"                                    self.tenant_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2Fwe0%3D","line":379,"in_reply_to":"AAAATn%2F8wTo%3D","updated":"2014-01-02 09:16:02.000000000","message":"Done","commit_id":"1b9863c478f78354932a05ee739cce1259979d55"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"378134e4f2622ea6afcac1bc89068faff0e48e3f","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        self.times \u003d []  # [(\"item\", starttime, endtime), ...]"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        self.management_url \u003d self.bypass_url if self.bypass_url else None"},{"line_number":84,"context_line":"        self.auth_token \u003d auth_token"},{"line_number":85,"context_line":"        self.proxy_token \u003d proxy_token"},{"line_number":86,"context_line":"        self.proxy_tenant_id \u003d proxy_tenant_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2FvMk%3D","line":83,"updated":"2014-01-02 16:46:00.000000000","message":"You could also use the idiom:\n\n    self.management_url \u003d self.bypass_url or None\n\nNo big deal, though.","commit_id":"3d7834365bcf16c18c0b0874f923b400aeaf5dfd"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"012a720aeb97921f3c736069d4c47405bb4b909e","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def _get_password(self):"},{"line_number":249,"context_line":"        if self.password:"},{"line_number":250,"context_line":"            pass"},{"line_number":251,"context_line":"        if self.password_fun:"},{"line_number":252,"context_line":"            self.password \u003d self.password_fun()"},{"line_number":253,"context_line":"        return self.password"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FWE8%3D","line":250,"updated":"2014-01-14 20:25:25.000000000","message":"What is the purpose of this if?  If you\u0027re just going to pass, you might as well eliminate the if statement, but based on the other _get_password() implementation I\u0027ve seen, I suspect you\u0027ve got a bug here.  I\u0027d suggest two things:\n\n1. Construct this function like so:\n\n    if not self.password and self.password_fun:\n        self.password \u003d self.password_fun()\n    return self.password\n\n2. Add unit tests to verify that the _get_password() function returns cached values and only calls self.password_fun() when it needs to.\n\nAs a side note, I personally would prefer the attribute be named \"password_func\" rather than \"password_fun\", but I won\u0027t down-vote if you choose not to.","commit_id":"ac8b126cfa800ba9f7765b8be981201be47b84fe"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"eb3a1a1928620464fb153e55cab5b1113d1ff7e0","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def _get_password(self):"},{"line_number":249,"context_line":"        if self.password:"},{"line_number":250,"context_line":"            pass"},{"line_number":251,"context_line":"        if self.password_fun:"},{"line_number":252,"context_line":"            self.password \u003d self.password_fun()"},{"line_number":253,"context_line":"        return self.password"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2FR0E%3D","line":250,"in_reply_to":"AAAAUH%2F%2FWE8%3D","updated":"2014-01-15 15:14:17.000000000","message":"Doh; good spot, thanks","commit_id":"ac8b126cfa800ba9f7765b8be981201be47b84fe"}],"novaclient/shell.py":[{"author":{"_account_id":6613,"name":"Matthew Macdonald-Wallace","email":"mmw@greenandsecure.co.uk","username":"proffalken"},"change_message_id":"b943941ef4e4ee080a62141c2ff66e47c51c0fab","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        parser.add_argument(\u0027--os-auth-token\u0027,"},{"line_number":262,"context_line":"                default\u003dutils.env(\u0027OS_AUTH_TOKEN\u0027),"},{"line_number":263,"context_line":"                help\u003d\u0027Defaults to env[OS_AUTH_TOKEN]\u0027)"},{"line_number":264,"context_line":"        parser.add_argument(\u0027--os_auth_token\u0027,"},{"line_number":265,"context_line":"                help\u003dargparse.SUPPRESS)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        parser.add_argument(\u0027--os-username\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8yUQ%3D","line":264,"updated":"2013-12-20 10:24:53.000000000","message":"Do we really need this argument with both \"-\" and \"_\"?\n\nMakes more sense to me to just offer one to make the code cleaner.","commit_id":"1b9863c478f78354932a05ee739cce1259979d55"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"d3cb318e4d9e806a21ff73880d1aa15fdc5bfb62","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        parser.add_argument(\u0027--os-auth-token\u0027,"},{"line_number":262,"context_line":"                default\u003dutils.env(\u0027OS_AUTH_TOKEN\u0027),"},{"line_number":263,"context_line":"                help\u003d\u0027Defaults to env[OS_AUTH_TOKEN]\u0027)"},{"line_number":264,"context_line":"        parser.add_argument(\u0027--os_auth_token\u0027,"},{"line_number":265,"context_line":"                help\u003dargparse.SUPPRESS)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        parser.add_argument(\u0027--os-username\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2Fwew%3D","line":264,"in_reply_to":"AAAATn%2F8wTA%3D","updated":"2014-01-02 09:16:02.000000000","message":"Done","commit_id":"1b9863c478f78354932a05ee739cce1259979d55"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"48488c1d79dc3c03c2c8795de4dbfc1e7492f29b","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        parser.add_argument(\u0027--os-auth-token\u0027,"},{"line_number":262,"context_line":"                default\u003dutils.env(\u0027OS_AUTH_TOKEN\u0027),"},{"line_number":263,"context_line":"                help\u003d\u0027Defaults to env[OS_AUTH_TOKEN]\u0027)"},{"line_number":264,"context_line":"        parser.add_argument(\u0027--os_auth_token\u0027,"},{"line_number":265,"context_line":"                help\u003dargparse.SUPPRESS)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        parser.add_argument(\u0027--os-username\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8wTA%3D","line":264,"in_reply_to":"AAAATn%2F8yPw%3D","updated":"2013-12-20 16:46:38.000000000","message":"The arguments with underscores are all deprecated.  Let\u0027s not add new arguments that are already deprecated.","commit_id":"1b9863c478f78354932a05ee739cce1259979d55"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"db90b76d45502e8dedbbadac9ca6908b3ca769d4","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        parser.add_argument(\u0027--os-auth-token\u0027,"},{"line_number":262,"context_line":"                default\u003dutils.env(\u0027OS_AUTH_TOKEN\u0027),"},{"line_number":263,"context_line":"                help\u003d\u0027Defaults to env[OS_AUTH_TOKEN]\u0027)"},{"line_number":264,"context_line":"        parser.add_argument(\u0027--os_auth_token\u0027,"},{"line_number":265,"context_line":"                help\u003dargparse.SUPPRESS)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        parser.add_argument(\u0027--os-username\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8yPw%3D","line":264,"in_reply_to":"AAAATn%2F8yUQ%3D","updated":"2013-12-20 10:43:31.000000000","message":"I copied this from the Glance client, it makes sense to me to be as consistent with other clients as possible so when users discover the new flag, it \"just works\" as they expect","commit_id":"1b9863c478f78354932a05ee739cce1259979d55"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"48488c1d79dc3c03c2c8795de4dbfc1e7492f29b","unresolved":false,"context_lines":[{"line_number":584,"context_line":""},{"line_number":585,"context_line":"        # If we have an auth token but no management_url, we must auth anyway."},{"line_number":586,"context_line":"        must_auth \u003d not (utils.isunauthenticated(args.func)"},{"line_number":587,"context_line":"                or (auth_token and management_url))"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"        #FIXME(usrleon): Here should be restrict for project id same as"},{"line_number":590,"context_line":"        # for os_username or os_password but for compatibility it is not."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F8wSo%3D","line":587,"updated":"2013-12-20 16:46:38.000000000","message":"I\u0027d prefer this be indented to line up with the open parenthesis (femtonit)","commit_id":"1b9863c478f78354932a05ee739cce1259979d55"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"d3cb318e4d9e806a21ff73880d1aa15fdc5bfb62","unresolved":false,"context_lines":[{"line_number":584,"context_line":""},{"line_number":585,"context_line":"        # If we have an auth token but no management_url, we must auth anyway."},{"line_number":586,"context_line":"        must_auth \u003d not (utils.isunauthenticated(args.func)"},{"line_number":587,"context_line":"                or (auth_token and management_url))"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"        #FIXME(usrleon): Here should be restrict for project id same as"},{"line_number":590,"context_line":"        # for os_username or os_password but for compatibility it is not."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2FweI%3D","line":587,"in_reply_to":"AAAATn%2F8wSo%3D","updated":"2014-01-02 09:16:02.000000000","message":"Nothing to do with me gov; done anyway","commit_id":"1b9863c478f78354932a05ee739cce1259979d55"}],"novaclient/tests/test_client.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"fd9ed5ed387129926e79ccd0b1d1b4decd246783","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def test_get_password_simple(self):"},{"line_number":201,"context_line":"        cs \u003d novaclient.client.HTTPClient(\"user\", \"password\", \"\", \"\")"},{"line_number":202,"context_line":"        cs.password_func \u003d lambda: fail(\"password_func called unnecessarily\")"},{"line_number":203,"context_line":"        self.assertEqual(cs._get_password(), \"password\")"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def test_get_password_none(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FRPI%3D","line":202,"updated":"2014-01-15 16:46:57.000000000","message":"What is fail()?  There is no fail() function within scope.  Perhaps you meant self.fail()?  But I\u0027d actually suggest a mock.Mock() and a test like:\n\n    self.assertFalse(cs.password_func.called)","commit_id":"7465c9f282a18ecd349a2e7bc2104d7048347048"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"120af0847588790f6df847d665dd2c268b190d55","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def test_get_password_simple(self):"},{"line_number":201,"context_line":"        cs \u003d novaclient.client.HTTPClient(\"user\", \"password\", \"\", \"\")"},{"line_number":202,"context_line":"        cs.password_func \u003d lambda: fail(\"password_func called unnecessarily\")"},{"line_number":203,"context_line":"        self.assertEqual(cs._get_password(), \"password\")"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    def test_get_password_none(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FRGI%3D","line":202,"in_reply_to":"AAAAUH%2F%2FRPI%3D","updated":"2014-01-15 17:16:36.000000000","message":"Oops, Java-mode was on. Done and thanks.","commit_id":"7465c9f282a18ecd349a2e7bc2104d7048347048"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"fd9ed5ed387129926e79ccd0b1d1b4decd246783","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def test_get_password_func(self):"},{"line_number":210,"context_line":"        cs \u003d novaclient.client.HTTPClient(\"user\", None, \"\", \"\")"},{"line_number":211,"context_line":"        cs.password_func \u003d lambda: \"password\""},{"line_number":212,"context_line":"        self.assertEqual(cs._get_password(), \"password\")"},{"line_number":213,"context_line":"        cs.password_func \u003d lambda: fail(\"password_func called unnecessarily\")"},{"line_number":214,"context_line":"        self.assertEqual(cs._get_password(), \"password\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FROw%3D","line":211,"updated":"2014-01-15 16:46:57.000000000","message":"You can use mock.Mock(return_value\u003d\u0027password\u0027); that way, you can also test that the function was actually called:\n\n    cs.password_func.assert_called_once_with()","commit_id":"7465c9f282a18ecd349a2e7bc2104d7048347048"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"120af0847588790f6df847d665dd2c268b190d55","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def test_get_password_func(self):"},{"line_number":210,"context_line":"        cs \u003d novaclient.client.HTTPClient(\"user\", None, \"\", \"\")"},{"line_number":211,"context_line":"        cs.password_func \u003d lambda: \"password\""},{"line_number":212,"context_line":"        self.assertEqual(cs._get_password(), \"password\")"},{"line_number":213,"context_line":"        cs.password_func \u003d lambda: fail(\"password_func called unnecessarily\")"},{"line_number":214,"context_line":"        self.assertEqual(cs._get_password(), \"password\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FRGA%3D","line":211,"in_reply_to":"AAAAUH%2F%2FROw%3D","updated":"2014-01-15 17:16:36.000000000","message":"Done","commit_id":"7465c9f282a18ecd349a2e7bc2104d7048347048"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"fd9ed5ed387129926e79ccd0b1d1b4decd246783","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        cs \u003d novaclient.client.HTTPClient(\"user\", None, \"\", \"\")"},{"line_number":211,"context_line":"        cs.password_func \u003d lambda: \"password\""},{"line_number":212,"context_line":"        self.assertEqual(cs._get_password(), \"password\")"},{"line_number":213,"context_line":"        cs.password_func \u003d lambda: fail(\"password_func called unnecessarily\")"},{"line_number":214,"context_line":"        self.assertEqual(cs._get_password(), \"password\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FROs%3D","line":213,"updated":"2014-01-15 16:46:57.000000000","message":"Again with the missing fail()…","commit_id":"7465c9f282a18ecd349a2e7bc2104d7048347048"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"38ccf6c013d2d4b1ec7e011dfa7904b884882816","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        cs \u003d novaclient.client.HTTPClient(\"user\", None, \"\", \"\")"},{"line_number":211,"context_line":"        cs.password_func \u003d lambda: \"password\""},{"line_number":212,"context_line":"        self.assertEqual(cs._get_password(), \"password\")"},{"line_number":213,"context_line":"        cs.password_func \u003d lambda: fail(\"password_func called unnecessarily\")"},{"line_number":214,"context_line":"        self.assertEqual(cs._get_password(), \"password\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FREg%3D","line":213,"in_reply_to":"AAAAUH%2F%2FRF8%3D","updated":"2014-01-15 17:18:47.000000000","message":"You can use it if you like, but I\u0027m fine either way.","commit_id":"7465c9f282a18ecd349a2e7bc2104d7048347048"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"120af0847588790f6df847d665dd2c268b190d55","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        cs \u003d novaclient.client.HTTPClient(\"user\", None, \"\", \"\")"},{"line_number":211,"context_line":"        cs.password_func \u003d lambda: \"password\""},{"line_number":212,"context_line":"        self.assertEqual(cs._get_password(), \"password\")"},{"line_number":213,"context_line":"        cs.password_func \u003d lambda: fail(\"password_func called unnecessarily\")"},{"line_number":214,"context_line":"        self.assertEqual(cs._get_password(), \"password\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2FRF8%3D","line":213,"in_reply_to":"AAAAUH%2F%2FROs%3D","updated":"2014-01-15 17:16:36.000000000","message":"Done. Would you prefer reset_mock to a new one?","commit_id":"7465c9f282a18ecd349a2e7bc2104d7048347048"}]}
