)]}'
{"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"52b6f9ed245dc56984c01d75f45f494d98dc21d8","unresolved":false,"context_lines":[{"line_number":586,"context_line":"        if name.find(\u0027 \u0027) !\u003d -1:"},{"line_number":587,"context_line":"            msg \u003d _(\"Device name can not include space.\")"},{"line_number":588,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    def _get_injected_files(self, personality):"},{"line_number":591,"context_line":"        \"\"\"Create a list of injected files from the personality attribute."},{"line_number":592,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F7T8%3D","line":589,"updated":"2012-12-06 17:34:48.000000000","message":"Any chance you could combine the first three checks with the method above? Perhaps a check_nonempty_string() function, that both of them call, with just the fourth check in the device name function in that case? This is duplicated code otherwise, and calling out the functions may help other folks use them in the future.","commit_id":"c9de373549d157aae5e588cdc1328742856ea8cb"},{"author":{"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},"change_message_id":"40473616403be5f8eac23111313c88915575147e","unresolved":false,"context_lines":[{"line_number":586,"context_line":"        if name.find(\u0027 \u0027) !\u003d -1:"},{"line_number":587,"context_line":"            msg \u003d _(\"Device name can not include space.\")"},{"line_number":588,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    def _get_injected_files(self, personality):"},{"line_number":591,"context_line":"        \"\"\"Create a list of injected files from the personality attribute."},{"line_number":592,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F6sY%3D","line":589,"in_reply_to":"AAAAMX%2F%2F7T8%3D","updated":"2012-12-07 05:46:53.000000000","message":"Certainly Dan, I\u0027l submit another patch.","commit_id":"c9de373549d157aae5e588cdc1328742856ea8cb"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"877e3bc028ba20d3d5d26696027d5a6d221b951e","unresolved":false,"context_lines":[{"line_number":557,"context_line":"        req.cache_db_instance(instance)"},{"line_number":558,"context_line":"        return instance"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    def _check_nonempty_string(self, value, name, max_length\u003dNone):"},{"line_number":561,"context_line":"        if not isinstance(value, basestring):"},{"line_number":562,"context_line":"            msg \u003d _(\"%s is not a string or unicode\") % name"},{"line_number":563,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FtC4%3D","line":560,"updated":"2013-01-09 05:51:37.000000000","message":"I don\u0027t like the name of method. It said check that string is not empty, but it checks also that string length is not bigger then max_length. Little bit misleading.","commit_id":"f7594cfd2040488d12f2b7dbf308445702116e09"},{"author":{"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},"change_message_id":"5d0518655c7fa018bc9fc544afb5ca183bb840ad","unresolved":false,"context_lines":[{"line_number":557,"context_line":"        req.cache_db_instance(instance)"},{"line_number":558,"context_line":"        return instance"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    def _check_nonempty_string(self, value, name, max_length\u003dNone):"},{"line_number":561,"context_line":"        if not isinstance(value, basestring):"},{"line_number":562,"context_line":"            msg \u003d _(\"%s is not a string or unicode\") % name"},{"line_number":563,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2Fs1I%3D","line":560,"in_reply_to":"AAAAM3%2F%2FtC4%3D","updated":"2013-01-09 06:28:20.000000000","message":"Done","commit_id":"f7594cfd2040488d12f2b7dbf308445702116e09"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"877e3bc028ba20d3d5d26696027d5a6d221b951e","unresolved":false,"context_lines":[{"line_number":577,"context_line":"    def _validate_device_name(self, value):"},{"line_number":578,"context_line":"        self._check_nonempty_string(value, \u0027Device name\u0027, max_length\u003d255)"},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"        if value.find(\u0027 \u0027) !\u003d -1:"},{"line_number":581,"context_line":"            msg \u003d _(\"Device name can not include space.\")"},{"line_number":582,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":583,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FtC0%3D","line":580,"updated":"2013-01-09 05:51:37.000000000","message":"I think that it will be a little bit clearly if you use something like:\nif \u0027 \u0027 in value:","commit_id":"f7594cfd2040488d12f2b7dbf308445702116e09"},{"author":{"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},"change_message_id":"5d0518655c7fa018bc9fc544afb5ca183bb840ad","unresolved":false,"context_lines":[{"line_number":577,"context_line":"    def _validate_device_name(self, value):"},{"line_number":578,"context_line":"        self._check_nonempty_string(value, \u0027Device name\u0027, max_length\u003d255)"},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"        if value.find(\u0027 \u0027) !\u003d -1:"},{"line_number":581,"context_line":"            msg \u003d _(\"Device name can not include space.\")"},{"line_number":582,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":583,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2Fs1E%3D","line":580,"in_reply_to":"AAAAM3%2F%2FtC0%3D","updated":"2013-01-09 06:28:20.000000000","message":"Done","commit_id":"f7594cfd2040488d12f2b7dbf308445702116e09"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"b527e2e99f3f9ed4cf9a1a666c38ea596886562e","unresolved":false,"context_lines":[{"line_number":571,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        if max_length and len(value) \u003e max_length:"},{"line_number":574,"context_line":"            msg \u003d _(\"%(name)s can be upto %(max_length)s \""},{"line_number":575,"context_line":"                    \"characters.\") % locals()"},{"line_number":576,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":577,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2Fr38%3D","line":574,"updated":"2013-01-09 16:53:33.000000000","message":"nit: Rephrase this as \"%(name)s can be at most %(max_length)s characters.\"  Note in particular that there is no such word as \"upto\" :)","commit_id":"128b18a21566681e2fd5bf5bfdbf26bed3b85202"},{"author":{"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},"change_message_id":"19314179508049f2598354e6f8357cc4d75169d7","unresolved":false,"context_lines":[{"line_number":571,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        if max_length and len(value) \u003e max_length:"},{"line_number":574,"context_line":"            msg \u003d _(\"%(name)s can be upto %(max_length)s \""},{"line_number":575,"context_line":"                    \"characters.\") % locals()"},{"line_number":576,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":577,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FqzY%3D","line":574,"in_reply_to":"AAAAM3%2F%2Fr38%3D","updated":"2013-01-10 05:34:03.000000000","message":"Done","commit_id":"128b18a21566681e2fd5bf5bfdbf26bed3b85202"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"b527e2e99f3f9ed4cf9a1a666c38ea596886562e","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        self._check_string_length(value, \u0027Device name\u0027, max_length\u003d255)"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"        if \u0027 \u0027 in value:"},{"line_number":585,"context_line":"            msg \u003d _(\"Device name can not include space.\")"},{"line_number":586,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"    def _get_injected_files(self, personality):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2Fr34%3D","line":585,"updated":"2013-01-09 16:53:33.000000000","message":"femtonit: \"Device name cannot include spaces.\"","commit_id":"128b18a21566681e2fd5bf5bfdbf26bed3b85202"},{"author":{"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},"change_message_id":"19314179508049f2598354e6f8357cc4d75169d7","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        self._check_string_length(value, \u0027Device name\u0027, max_length\u003d255)"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"        if \u0027 \u0027 in value:"},{"line_number":585,"context_line":"            msg \u003d _(\"Device name can not include space.\")"},{"line_number":586,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"    def _get_injected_files(self, personality):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2Fqzc%3D","line":585,"in_reply_to":"AAAAM3%2F%2Fr34%3D","updated":"2013-01-10 05:34:03.000000000","message":"Done","commit_id":"128b18a21566681e2fd5bf5bfdbf26bed3b85202"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"085b2353e4b961049d5c5ab5b22387a53255452e","unresolved":false,"context_lines":[{"line_number":571,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        if max_length and len(value) \u003e max_length:"},{"line_number":574,"context_line":"            msg \u003d _(\"%(name)s can be atmost %(max_length)s \""},{"line_number":575,"context_line":"                    \"characters.\") % locals()"},{"line_number":576,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":577,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FqNk%3D","line":574,"updated":"2013-01-10 16:24:02.000000000","message":"\"atmost\" is not a word either.","commit_id":"21f84c40a58a1760263f213bbd58c427fbf83e1b"}]}
