)]}'
{"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bbef510bd68757e36195914e83f87c8e19fe5258","unresolved":false,"context_lines":[{"line_number":288,"context_line":"            injected_files.append((path, contents))"},{"line_number":289,"context_line":"        return injected_files"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def _get_requested_networks(self, requested_networks, sg_names\u003dNone):"},{"line_number":292,"context_line":"        \"\"\"Create a list of requested networks from the networks attribute.\"\"\""},{"line_number":293,"context_line":"        networks \u003d []"},{"line_number":294,"context_line":"        network_uuids \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_1e5e7312","line":291,"updated":"2015-06-08 08:59:55.000000000","message":"no need to define sg_names as kwargs","commit_id":"f95c5b382a533bdd51b45cd73bf34559d4c4d547"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bbef510bd68757e36195914e83f87c8e19fe5258","unresolved":false,"context_lines":[{"line_number":294,"context_line":"        network_uuids \u003d []"},{"line_number":295,"context_line":"        has_port \u003d False"},{"line_number":296,"context_line":"        if not sg_names:"},{"line_number":297,"context_line":"            sg_names \u003d []"},{"line_number":298,"context_line":"        for network in requested_networks:"},{"line_number":299,"context_line":"            request \u003d objects.NetworkRequest()"},{"line_number":300,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_7e97a790","line":297,"updated":"2015-06-08 08:59:55.000000000","message":"no need of this check and initializing sg_names to empty as sg_names will never passed as None, by default it will contain \u0027default\u0027 sec name.","commit_id":"f95c5b382a533bdd51b45cd73bf34559d4c4d547"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bbef510bd68757e36195914e83f87c8e19fe5258","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            except TypeError:"},{"line_number":349,"context_line":"                expl \u003d _(\u0027Bad networks format\u0027)"},{"line_number":350,"context_line":"                raise exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":351,"context_line":"        if sg_names !\u003d [\u0027default\u0027] and sg_names !\u003d [] and has_port:"},{"line_number":352,"context_line":"            LOG.warning(_LW(\"security group is invalid to port\"))"},{"line_number":353,"context_line":"        return objects.NetworkRequestList(objects\u003dnetworks)"},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_3e4c8f6f","line":351,"updated":"2015-06-08 08:59:55.000000000","message":"You can format this condition as,\n\nif has_port and sg_names !\u003d [\u0027default\u0027]:\n\nThere is no need of empty check as sg_names will never be empty, refer line #544 (if no sg_names is specified then \u0027default\u0027 is added in the list)","commit_id":"f95c5b382a533bdd51b45cd73bf34559d4c4d547"}]}
