)]}'
{"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"f74591685bfb14b63dbce80e20db273f8c12b2fd","unresolved":false,"context_lines":[{"line_number":572,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":573,"context_line":""},{"line_number":574,"context_line":"        if max_length and len(value) \u003e max_length:"},{"line_number":575,"context_line":"            msg \u003d _(\"%(name)s can be at most %(max_length)s \""},{"line_number":576,"context_line":"                    \"characters.\") % locals()"},{"line_number":577,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":578,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FOWY%3D","side":"PARENT","line":575,"updated":"2013-02-01 13:24:00.000000000","message":"Does \"%(name)s has more than %(max_length)s characters.\" sound better?","commit_id":"c421d775ee3052d1af4c08b8ff81f6877ca8b1a8"},{"author":{"_account_id":6348,"name":"xu-haiwei","email":"hai-xu@xr.jp.nec.com","username":"xu-haiwei"},"change_message_id":"7dabc59b25fa9839900d1e63e30b127b6aed3c54","unresolved":false,"context_lines":[{"line_number":572,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":573,"context_line":""},{"line_number":574,"context_line":"        if max_length and len(value) \u003e max_length:"},{"line_number":575,"context_line":"            msg \u003d _(\"%(name)s can be at most %(max_length)s \""},{"line_number":576,"context_line":"                    \"characters.\") % locals()"},{"line_number":577,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":578,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FMkI%3D","side":"PARENT","line":575,"in_reply_to":"AAAAM3%2F%2FOWY%3D","updated":"2013-02-04 00:34:10.000000000","message":"I will fix this message in /nova/utils.py","commit_id":"c421d775ee3052d1af4c08b8ff81f6877ca8b1a8"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"7c1754db5ccc0ea0a2a227ab1b329a29bbef07ac","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    def _check_string_length(self, value, name, max_length\u003dNone):"},{"line_number":566,"context_line":"        try:"},{"line_number":567,"context_line":"            utils.check_string_length(value, name, min_length\u003d1,"},{"line_number":568,"context_line":"                                       max_length\u003dmax_length)"},{"line_number":569,"context_line":"        except exception.InvalidInput as e:"},{"line_number":570,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de)"},{"line_number":571,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FG%2FQ%3D","line":568,"updated":"2013-02-06 22:15:50.000000000","message":"femtonit: reduce the indent by one space, so that \"max_length\u003dmax_length\" lines up immediately after the open parenthesis of the check_string_length().","commit_id":"54b68413d9b76a39e0ad93b20371fc2bee3dfe69"},{"author":{"_account_id":6348,"name":"xu-haiwei","email":"hai-xu@xr.jp.nec.com","username":"xu-haiwei"},"change_message_id":"5180bed5c5e835965e567017fd375441b08efa22","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    def _check_string_length(self, value, name, max_length\u003dNone):"},{"line_number":566,"context_line":"        try:"},{"line_number":567,"context_line":"            utils.check_string_length(value, name, min_length\u003d1,"},{"line_number":568,"context_line":"                                       max_length\u003dmax_length)"},{"line_number":569,"context_line":"        except exception.InvalidInput as e:"},{"line_number":570,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de)"},{"line_number":571,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FGFI%3D","line":568,"in_reply_to":"AAAAM3%2F%2FG%2FQ%3D","updated":"2013-02-07 09:22:04.000000000","message":"I will amend it. Thank you for your comment.","commit_id":"54b68413d9b76a39e0ad93b20371fc2bee3dfe69"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"ce7ca23030822999e6a63e4fc74c9a558263f12a","unresolved":false,"context_lines":[{"line_number":567,"context_line":"            utils.check_string_length(value, name, min_length\u003d1,"},{"line_number":568,"context_line":"                                      max_length\u003dmax_length)"},{"line_number":569,"context_line":"        except exception.InvalidInput as e:"},{"line_number":570,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de)"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"    def _validate_server_name(self, value):"},{"line_number":573,"context_line":"        self._check_string_length(value, \u0027Server name\u0027, max_length\u003d255)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B%2Byk%3D","line":570,"updated":"2013-02-12 16:20:02.000000000","message":"I did some playing with this, and I discovered that you really need to pass a string to explanation, i.e., change this to:\n\n    raise exc.HTTPBadRequest(explanation\u003dstr(e))","commit_id":"5fe4cdb9ff36115115794c94a86698a21818e3c9"}],"nova/compute/instance_types.py":[{"author":{"_account_id":6348,"name":"xu-haiwei","email":"hai-xu@xr.jp.nec.com","username":"xu-haiwei"},"change_message_id":"2523ba308a1242d1c8a9e0a5b993599580119e54","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    }"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    # ensure name do not exceed 255 characters"},{"line_number":90,"context_line":"    utils.check_string_length(name, \u0027name\u0027, max_length\u003d255)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    # ensure name does not contain any special characters"},{"line_number":93,"context_line":"    invalid_name \u003d INVALID_NAME_REGEX.search(name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B9kQ%3D","line":90,"updated":"2013-02-13 10:08:11.000000000","message":"\"min_length\u003d1\" should be added to make sure the flavor name won\u0027t be blank.","commit_id":"5fe4cdb9ff36115115794c94a86698a21818e3c9"}],"nova/tests/test_instance_types.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"8f77b159e40a7c2da022f47ed93cf36e6d22d8d9","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        else:"},{"line_number":41,"context_line":"            return nonexistent_flavor"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _test_flavor_name_length(self):"},{"line_number":44,"context_line":"        \"\"\"Flavor name with 255 characters or less is valid.\"\"\""},{"line_number":45,"context_line":"        name \u003d \u0027a\u0027 * 255"},{"line_number":46,"context_line":"        inst_type \u003d instance_types.create(name, 64, 1, 120, flavorid\u003d11)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FP08%3D","line":43,"updated":"2013-01-31 15:17:42.000000000","message":"This test will not run because of the _ at the start of the name.  This test, and the one below, should start with test_.","commit_id":"01ad63569cf0523fbc5474b309cdc270f3cd3691"}],"nova/tests/test_utils.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"8f77b159e40a7c2da022f47ed93cf36e6d22d8d9","unresolved":false,"context_lines":[{"line_number":792,"context_line":""},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"class StringLengthTestCase(test.TestCase):"},{"line_number":795,"context_line":"    def test_check_string_length(self):"},{"line_number":796,"context_line":"        self.assertRaises(exception.InvalidInput,"},{"line_number":797,"context_line":"                          utils.check_string_length,"},{"line_number":798,"context_line":"                          11, \u0027name\u0027, max_length\u003d255)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FP1I%3D","line":795,"updated":"2013-01-31 15:17:42.000000000","message":"Ideally this would be three different test methods, one for a successful check, one failing min_length, and one failing max_length.  And possibly a fourth method for checking something that isn\u0027t a string.","commit_id":"01ad63569cf0523fbc5474b309cdc270f3cd3691"}],"nova/utils.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7dc6ed19423ffac5ed177bfa691c8779eb43cdc2","unresolved":false,"context_lines":[{"line_number":1272,"context_line":"    return result"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":""},{"line_number":1275,"context_line":"def check_string_length(value, name, max_length\u003dNone):"},{"line_number":1276,"context_line":"    \"\"\"Check the length of specified string"},{"line_number":1277,"context_line":"    :param value: the value of the string"},{"line_number":1278,"context_line":"    :param name: the name of the string"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FVXg%3D","line":1275,"updated":"2013-01-28 16:54:58.000000000","message":"You should test this method specifically in nova/tests/test_utils.py, in addition to the other testing you already have.","commit_id":"a64e52f313f49e0c89a4236d9a5c5f8ca56dccf5"},{"author":{"_account_id":6348,"name":"xu-haiwei","email":"hai-xu@xr.jp.nec.com","username":"xu-haiwei"},"change_message_id":"721ae1a2d25e1a5ddef5a88df96844c8508b35dd","unresolved":false,"context_lines":[{"line_number":1272,"context_line":"    return result"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":""},{"line_number":1275,"context_line":"def check_string_length(value, name, max_length\u003dNone):"},{"line_number":1276,"context_line":"    \"\"\"Check the length of specified string"},{"line_number":1277,"context_line":"    :param value: the value of the string"},{"line_number":1278,"context_line":"    :param name: the name of the string"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FUlc%3D","line":1275,"in_reply_to":"AAAAM3%2F%2FVXg%3D","updated":"2013-01-29 04:47:24.000000000","message":"i will add this method\u0027s test in nova/tests/test_utils.py in the next patch.","commit_id":"a64e52f313f49e0c89a4236d9a5c5f8ca56dccf5"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7dc6ed19423ffac5ed177bfa691c8779eb43cdc2","unresolved":false,"context_lines":[{"line_number":1280,"context_line":"    \"\"\""},{"line_number":1281,"context_line":"    if not isinstance(value, basestring):"},{"line_number":1282,"context_line":"        msg \u003d _(\"%s is not a string or unicode\") % name"},{"line_number":1283,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1284,"context_line":""},{"line_number":1285,"context_line":"    if not value.strip():"},{"line_number":1286,"context_line":"        msg \u003d _(\"%s is an empty string\") % name"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FVYo%3D","line":1283,"updated":"2013-01-28 16:54:58.000000000","message":"If this method is going to be in nova/utils.py it shouldn\u0027t raise webob exceptions.  It\u0027s not useful as a utility method if it\u0027s linked to api exceptions.  Also, given the method name it should be safe to assume that it\u0027s a string.  If additional checking is needed it should be done by the caller before passing it here.","commit_id":"a64e52f313f49e0c89a4236d9a5c5f8ca56dccf5"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"417314fe81251e80cc7c9619900b588ad6f6743a","unresolved":false,"context_lines":[{"line_number":1280,"context_line":"    \"\"\""},{"line_number":1281,"context_line":"    if not isinstance(value, basestring):"},{"line_number":1282,"context_line":"        msg \u003d _(\"%s is not a string or unicode\") % name"},{"line_number":1283,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1284,"context_line":""},{"line_number":1285,"context_line":"    if not value.strip():"},{"line_number":1286,"context_line":"        msg \u003d _(\"%s is an empty string\") % name"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FT74%3D","line":1283,"in_reply_to":"AAAAM3%2F%2FUko%3D","updated":"2013-01-29 14:38:22.000000000","message":"The string check is fine.  If callers don\u0027t want to catch that exception they can check before passing it in.","commit_id":"a64e52f313f49e0c89a4236d9a5c5f8ca56dccf5"},{"author":{"_account_id":6348,"name":"xu-haiwei","email":"hai-xu@xr.jp.nec.com","username":"xu-haiwei"},"change_message_id":"721ae1a2d25e1a5ddef5a88df96844c8508b35dd","unresolved":false,"context_lines":[{"line_number":1280,"context_line":"    \"\"\""},{"line_number":1281,"context_line":"    if not isinstance(value, basestring):"},{"line_number":1282,"context_line":"        msg \u003d _(\"%s is not a string or unicode\") % name"},{"line_number":1283,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1284,"context_line":""},{"line_number":1285,"context_line":"    if not value.strip():"},{"line_number":1286,"context_line":"        msg \u003d _(\"%s is an empty string\") % name"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FUko%3D","line":1283,"in_reply_to":"AAAAM3%2F%2FVYo%3D","updated":"2013-01-29 04:47:24.000000000","message":"I will change the webob exception to another one in the next patch.\nBut i am afraid it\u0027s not good to remove the string check, because it often needs to do it at the callers. Though the method name is \u0027check_string_length\u0027, i think it\u0027s not bad to ensure it is a string inside the method.And i just change the location of the \u0027check_string_length\u0027 method which originally contains this isinstance().","commit_id":"a64e52f313f49e0c89a4236d9a5c5f8ca56dccf5"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7dc6ed19423ffac5ed177bfa691c8779eb43cdc2","unresolved":false,"context_lines":[{"line_number":1282,"context_line":"        msg \u003d _(\"%s is not a string or unicode\") % name"},{"line_number":1283,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1284,"context_line":""},{"line_number":1285,"context_line":"    if not value.strip():"},{"line_number":1286,"context_line":"        msg \u003d _(\"%s is an empty string\") % name"},{"line_number":1287,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1288,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FVYY%3D","line":1285,"updated":"2013-01-28 16:54:58.000000000","message":"Rather than assuming that the minimum length should be \u003e 0, there should probably be a min_length argument that defaults to 0.","commit_id":"a64e52f313f49e0c89a4236d9a5c5f8ca56dccf5"},{"author":{"_account_id":6348,"name":"xu-haiwei","email":"hai-xu@xr.jp.nec.com","username":"xu-haiwei"},"change_message_id":"578fe6f6fe571ddb63e1af0a259411e51fc68fef","unresolved":false,"context_lines":[{"line_number":1282,"context_line":"        msg \u003d _(\"%s is not a string or unicode\") % name"},{"line_number":1283,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1284,"context_line":""},{"line_number":1285,"context_line":"    if not value.strip():"},{"line_number":1286,"context_line":"        msg \u003d _(\"%s is an empty string\") % name"},{"line_number":1287,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1288,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FQrw%3D","line":1285,"in_reply_to":"AAAAM3%2F%2FT8c%3D","updated":"2013-01-31 02:29:32.000000000","message":"Ok.Your advice helps me.I will set the min_length 0 in this method,and set it 1 in the API input validation.","commit_id":"a64e52f313f49e0c89a4236d9a5c5f8ca56dccf5"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"417314fe81251e80cc7c9619900b588ad6f6743a","unresolved":false,"context_lines":[{"line_number":1282,"context_line":"        msg \u003d _(\"%s is not a string or unicode\") % name"},{"line_number":1283,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1284,"context_line":""},{"line_number":1285,"context_line":"    if not value.strip():"},{"line_number":1286,"context_line":"        msg \u003d _(\"%s is an empty string\") % name"},{"line_number":1287,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1288,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FT8c%3D","line":1285,"in_reply_to":"AAAAM3%2F%2FUik%3D","updated":"2013-01-29 14:38:22.000000000","message":"I would rather not assume that an empty string is an error in most cases.  It made sense when this method was only used for API input validation but by moving it here it becomes more useful to have it be slightly more generic and not surprising to callers.  I see it as a check on string length, not a check to see if input was given.","commit_id":"a64e52f313f49e0c89a4236d9a5c5f8ca56dccf5"},{"author":{"_account_id":6348,"name":"xu-haiwei","email":"hai-xu@xr.jp.nec.com","username":"xu-haiwei"},"change_message_id":"721ae1a2d25e1a5ddef5a88df96844c8508b35dd","unresolved":false,"context_lines":[{"line_number":1282,"context_line":"        msg \u003d _(\"%s is not a string or unicode\") % name"},{"line_number":1283,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1284,"context_line":""},{"line_number":1285,"context_line":"    if not value.strip():"},{"line_number":1286,"context_line":"        msg \u003d _(\"%s is an empty string\") % name"},{"line_number":1287,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1288,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FUik%3D","line":1285,"in_reply_to":"AAAAM3%2F%2FVYY%3D","updated":"2013-01-29 04:47:24.000000000","message":"I agree with you on adding a min_length argument but shouldn\u0027t it be defaults to 1?","commit_id":"a64e52f313f49e0c89a4236d9a5c5f8ca56dccf5"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7dc6ed19423ffac5ed177bfa691c8779eb43cdc2","unresolved":false,"context_lines":[{"line_number":1284,"context_line":""},{"line_number":1285,"context_line":"    if not value.strip():"},{"line_number":1286,"context_line":"        msg \u003d _(\"%s is an empty string\") % name"},{"line_number":1287,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1288,"context_line":""},{"line_number":1289,"context_line":"    if max_length and len(value) \u003e max_length:"},{"line_number":1290,"context_line":"        msg \u003d _(\"%(name)s can be at most %(max_length)s \""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FVXk%3D","line":1287,"updated":"2013-01-28 16:54:58.000000000","message":"You may want to create new exceptions for the cases of the string being too short or too long.  Though if it doesn\u0027t matter how the length violation occurred then a simple true/false return could work.","commit_id":"a64e52f313f49e0c89a4236d9a5c5f8ca56dccf5"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"417314fe81251e80cc7c9619900b588ad6f6743a","unresolved":false,"context_lines":[{"line_number":1284,"context_line":""},{"line_number":1285,"context_line":"    if not value.strip():"},{"line_number":1286,"context_line":"        msg \u003d _(\"%s is an empty string\") % name"},{"line_number":1287,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1288,"context_line":""},{"line_number":1289,"context_line":"    if max_length and len(value) \u003e max_length:"},{"line_number":1290,"context_line":"        msg \u003d _(\"%(name)s can be at most %(max_length)s \""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FT9E%3D","line":1287,"in_reply_to":"AAAAM3%2F%2FUkI%3D","updated":"2013-01-29 14:38:22.000000000","message":"That\u0027s fair, and probably easiest given the three possibilities for the check to succeed/fail.","commit_id":"a64e52f313f49e0c89a4236d9a5c5f8ca56dccf5"},{"author":{"_account_id":6348,"name":"xu-haiwei","email":"hai-xu@xr.jp.nec.com","username":"xu-haiwei"},"change_message_id":"721ae1a2d25e1a5ddef5a88df96844c8508b35dd","unresolved":false,"context_lines":[{"line_number":1284,"context_line":""},{"line_number":1285,"context_line":"    if not value.strip():"},{"line_number":1286,"context_line":"        msg \u003d _(\"%s is an empty string\") % name"},{"line_number":1287,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1288,"context_line":""},{"line_number":1289,"context_line":"    if max_length and len(value) \u003e max_length:"},{"line_number":1290,"context_line":"        msg \u003d _(\"%(name)s can be at most %(max_length)s \""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FUkI%3D","line":1287,"in_reply_to":"AAAAM3%2F%2FVXk%3D","updated":"2013-01-29 04:47:24.000000000","message":"I would prefer to using exceptions. Because it is easy to show the details(ex:\"name can be at most xxx characters\") of the error message.","commit_id":"a64e52f313f49e0c89a4236d9a5c5f8ca56dccf5"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"8f77b159e40a7c2da022f47ed93cf36e6d22d8d9","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"        raise exception.InvalidInput(message\u003dmsg)"},{"line_number":1287,"context_line":""},{"line_number":1288,"context_line":"    if  len(value) \u003c min_length:"},{"line_number":1289,"context_line":"        msg \u003d _(\"%s is an empty string\") % name"},{"line_number":1290,"context_line":"        raise exception.InvalidInput(message\u003dmsg)"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"    if max_length and len(value) \u003e max_length:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FP1c%3D","line":1289,"updated":"2013-01-31 15:17:42.000000000","message":"Now that max_length is configurable it may not be an empty string if it fails.  Can you make this message similar to the max_length one below?","commit_id":"01ad63569cf0523fbc5474b309cdc270f3cd3691"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"8d097f9dbfe896e0dc73f23b8ce03f55674eb214","unresolved":false,"context_lines":[{"line_number":1289,"context_line":"def check_string_length(value, name, min_length\u003d0, max_length\u003dNone):"},{"line_number":1290,"context_line":"    \"\"\"Check the length of specified string"},{"line_number":1291,"context_line":"    :param value: the value of the string"},{"line_number":1292,"context_line":"    :param name: the name of the string"},{"line_number":1293,"context_line":"    :param min_length: the min_length of the string"},{"line_number":1294,"context_line":"    :param max_length: the max_length of the string"},{"line_number":1295,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FJu4%3D","line":1292,"updated":"2013-02-05 14:59:37.000000000","message":"I just realized that this name concept doesn\u0027t really belong in this method.  It shouldn\u0027t be a requirement to name a string just to check its length.  I would substitute value for name in the exception messages and remove this parameter.  Except for this it looks great to me.","commit_id":"54b68413d9b76a39e0ad93b20371fc2bee3dfe69"},{"author":{"_account_id":6348,"name":"xu-haiwei","email":"hai-xu@xr.jp.nec.com","username":"xu-haiwei"},"change_message_id":"ac1540496151de15309ae468f3f39c09b8aeeb8c","unresolved":false,"context_lines":[{"line_number":1289,"context_line":"def check_string_length(value, name, min_length\u003d0, max_length\u003dNone):"},{"line_number":1290,"context_line":"    \"\"\"Check the length of specified string"},{"line_number":1291,"context_line":"    :param value: the value of the string"},{"line_number":1292,"context_line":"    :param name: the name of the string"},{"line_number":1293,"context_line":"    :param min_length: the min_length of the string"},{"line_number":1294,"context_line":"    :param max_length: the max_length of the string"},{"line_number":1295,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FIX4%3D","line":1292,"in_reply_to":"AAAAM3%2F%2FJu4%3D","updated":"2013-02-06 05:02:42.000000000","message":"Thank you for your comment. But i am afraid i can\u0027t agree with you.\nBecause when name is \u0027Flavor name\u0027 and value is \u0027aaaa...aa\u0027(more than 255 characters), the error message \u0027Flavor name has more than 255 characters\u0027 is better than \u0027aaa...aa has more than 255 characters\u0027.\nAlso, when value is blank, the error message \u0027 has less than 1 characters\u0027 is not good either.","commit_id":"54b68413d9b76a39e0ad93b20371fc2bee3dfe69"}]}
