)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"2e10bc94e7a1d652ae709e4c9300c2b39a401422","unresolved":false,"context_lines":[{"line_number":13,"context_line":"a StrOpt that allowed case insensitivity to a StrOpt with choices."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Required for I8d9ee833263560caaffe083487abc5eda862f8ea"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I51cebcca15aaf2970b0e00457cd156d84e7915e8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7ad32947_f90e5de4","line":16,"updated":"2015-04-28 00:33:57.000000000","message":"Should be associated with a bug or a blueprint for tracking.","commit_id":"c9680c60dfc41b5af1c740ac90081b3773cd7a03"}],"oslo_config/types.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"7e799a13591646b379e1bf22b625bf5612e494e2","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                    raise ValueError(\u0027Non-closed quote: %s\u0027 % value)"},{"line_number":60,"context_line":"                value \u003d value[1:-1]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        if self.choices is None:"},{"line_number":63,"context_line":"            return value"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        # Find case insensitive match"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6ced46_ba010308","line":62,"updated":"2015-03-25 19:38:38.000000000","message":"It seems like this line could be left as-is to try to find an exact match and thus save the cycles needed to lowercase all of the choices. Bit of a micro-optimization, I suppose.","commit_id":"2daf465e11ec1045b6eac0260829502eebe546d1"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"625bc9ee09194c9bafd8f110db13a764880a75f3","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                    raise ValueError(\u0027Non-closed quote: %s\u0027 % value)"},{"line_number":60,"context_line":"                value \u003d value[1:-1]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        if self.choices is None:"},{"line_number":63,"context_line":"            return value"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        # Find case insensitive match"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6ced46_c2e335a2","line":62,"in_reply_to":"1a6ced46_ba010308","updated":"2015-03-25 21:35:03.000000000","message":"Done","commit_id":"2daf465e11ec1045b6eac0260829502eebe546d1"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"246bd4d988b7d3c6ed874ac05a63cf33f0b98ffa","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            idx \u003d lc_choices.index(value.lower())"},{"line_number":69,"context_line":"            return self.choices[idx]"},{"line_number":70,"context_line":"        except ValueError:"},{"line_number":71,"context_line":"            raise ValueError("},{"line_number":72,"context_line":"                \u0027Valid values are [%s], but found %s\u0027 % ("},{"line_number":73,"context_line":"                    \u0027, \u0027.join([str(v) for v in self.choices]),"},{"line_number":74,"context_line":"                    repr(value)))"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6ced46_5d480487","line":71,"updated":"2015-03-25 22:02:43.000000000","message":"Opinion: Is it better to raise a new ValueError or reraise the ValueError with the modified message?","commit_id":"c9680c60dfc41b5af1c740ac90081b3773cd7a03"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"94aa3aa5bf907eb126c5363e1cdf52ec7e3c7364","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            idx \u003d lc_choices.index(value.lower())"},{"line_number":69,"context_line":"            return self.choices[idx]"},{"line_number":70,"context_line":"        except ValueError:"},{"line_number":71,"context_line":"            raise ValueError("},{"line_number":72,"context_line":"                \u0027Valid values are [%s], but found %s\u0027 % ("},{"line_number":73,"context_line":"                    \u0027, \u0027.join([str(v) for v in self.choices]),"},{"line_number":74,"context_line":"                    repr(value)))"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_a308702e","line":71,"in_reply_to":"1a6ced46_5d480487","updated":"2015-05-15 16:47:51.000000000","message":"I like the modified message.  We\u0027re only using the original ValueError in this case to indicate that the option was not found in choices, so it\u0027s message isn\u0027t the best for explaining what went wrong.","commit_id":"c9680c60dfc41b5af1c740ac90081b3773cd7a03"}],"tests/test_cfg.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"7e799a13591646b379e1bf22b625bf5612e494e2","unresolved":false,"context_lines":[{"line_number":3443,"context_line":"        self.conf.register_cli_opt(cfg.StrOpt(\u0027foo\u0027,"},{"line_number":3444,"context_line":"                                   choices\u003d[\u0027BAR1\u0027, \u0027BAR2\u0027]))"},{"line_number":3445,"context_line":"        self.conf([\u0027--foo\u0027, \u0027bar1\u0027])"},{"line_number":3446,"context_line":"        self.assertEqual(self.conf.foo, \u0027BAR1\u0027)"},{"line_number":3447,"context_line":""},{"line_number":3448,"context_line":"    def test_choice_bad(self):"},{"line_number":3449,"context_line":"        self.conf.register_cli_opt(cfg.StrOpt(\u0027foo\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6ced46_6e5b502e","line":3446,"updated":"2015-03-25 19:38:38.000000000","message":"Instead of doing the choices in all uppercase and the argument in all lowercase, mix case in both to ensure that the case is normalized properly. This test would also pass if only the choices were lowercased for comparison, or if only the arguments were uppercased for comparison.","commit_id":"2daf465e11ec1045b6eac0260829502eebe546d1"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"625bc9ee09194c9bafd8f110db13a764880a75f3","unresolved":false,"context_lines":[{"line_number":3443,"context_line":"        self.conf.register_cli_opt(cfg.StrOpt(\u0027foo\u0027,"},{"line_number":3444,"context_line":"                                   choices\u003d[\u0027BAR1\u0027, \u0027BAR2\u0027]))"},{"line_number":3445,"context_line":"        self.conf([\u0027--foo\u0027, \u0027bar1\u0027])"},{"line_number":3446,"context_line":"        self.assertEqual(self.conf.foo, \u0027BAR1\u0027)"},{"line_number":3447,"context_line":""},{"line_number":3448,"context_line":"    def test_choice_bad(self):"},{"line_number":3449,"context_line":"        self.conf.register_cli_opt(cfg.StrOpt(\u0027foo\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6ced46_a288f9c5","line":3446,"in_reply_to":"1a6ced46_6e5b502e","updated":"2015-03-25 21:35:03.000000000","message":"Done","commit_id":"2daf465e11ec1045b6eac0260829502eebe546d1"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"7e799a13591646b379e1bf22b625bf5612e494e2","unresolved":false,"context_lines":[{"line_number":3470,"context_line":"        self.conf([\u0027--config-file\u0027, paths[0]])"},{"line_number":3471,"context_line":""},{"line_number":3472,"context_line":"        self.assertTrue(hasattr(self.conf, \u0027foo\u0027))"},{"line_number":3473,"context_line":"        self.assertEqual(self.conf.foo, \u0027BAR1\u0027)"},{"line_number":3474,"context_line":""},{"line_number":3475,"context_line":"    def test_conf_file_bad_choice_value(self):"},{"line_number":3476,"context_line":"        self.conf.register_opt(cfg.StrOpt(\u0027foo\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6ced46_4ea4d407","line":3473,"updated":"2015-03-25 19:38:38.000000000","message":"Same -- mix case in both choices and config argument.","commit_id":"2daf465e11ec1045b6eac0260829502eebe546d1"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"625bc9ee09194c9bafd8f110db13a764880a75f3","unresolved":false,"context_lines":[{"line_number":3470,"context_line":"        self.conf([\u0027--config-file\u0027, paths[0]])"},{"line_number":3471,"context_line":""},{"line_number":3472,"context_line":"        self.assertTrue(hasattr(self.conf, \u0027foo\u0027))"},{"line_number":3473,"context_line":"        self.assertEqual(self.conf.foo, \u0027BAR1\u0027)"},{"line_number":3474,"context_line":""},{"line_number":3475,"context_line":"    def test_conf_file_bad_choice_value(self):"},{"line_number":3476,"context_line":"        self.conf.register_opt(cfg.StrOpt(\u0027foo\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6ced46_c29175f2","line":3473,"in_reply_to":"1a6ced46_4ea4d407","updated":"2015-03-25 21:35:03.000000000","message":"Done","commit_id":"2daf465e11ec1045b6eac0260829502eebe546d1"}]}
