diff options
| author | Zhongyue Luo <lzyeval@gmail.com> | 2012-05-16 17:08:27 +0800 |
|---|---|---|
| committer | Zhongyue Luo <lzyeval@gmail.com> | 2012-05-31 11:26:37 +0800 |
| commit | 61c5597a09945982f093412cd134850346b82e3b (patch) | |
| tree | 17c543635e9a50e5d70f87b8079bbcddb6f14575 /nova/api | |
| parent | 0f2142b14adc442840c79a48add0dab78acf7c93 (diff) | |
| download | nova-61c5597a09945982f093412cd134850346b82e3b.tar.gz nova-61c5597a09945982f093412cd134850346b82e3b.tar.xz nova-61c5597a09945982f093412cd134850346b82e3b.zip | |
Backslash continuation removal (Nova folsom-2)
Fixes bug #938588
Backslash continuations removal for scripts in bin/, plugin/, and etc.
Change-Id: Idd17048b6e8db6e939946968e011e68da8585b8d
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/extended_server_attributes.py | 16 | ||||
| -rw-r--r-- | nova/api/openstack/compute/contrib/flavorextradata.py | 13 |
2 files changed, 15 insertions, 14 deletions
diff --git a/nova/api/openstack/compute/contrib/extended_server_attributes.py b/nova/api/openstack/compute/contrib/extended_server_attributes.py index 2da5badc3..4c584ec05 100644 --- a/nova/api/openstack/compute/contrib/extended_server_attributes.py +++ b/nova/api/openstack/compute/contrib/extended_server_attributes.py @@ -104,8 +104,8 @@ class Extended_server_attributes(extensions.ExtensionDescriptor): name = "ExtendedServerAttributes" alias = "OS-EXT-SRV-ATTR" - namespace = "http://docs.openstack.org/compute/ext/" \ - "extended_status/api/v1.1" + namespace = ("http://docs.openstack.org/compute/ext/" + "extended_status/api/v1.1") updated = "2011-11-03T00:00:00+00:00" def get_controller_extensions(self): @@ -125,9 +125,9 @@ class ExtendedServerAttributeTemplate(xmlutil.TemplateBuilder): def construct(self): root = xmlutil.TemplateElement('server', selector='server') make_server(root) - return xmlutil.SlaveTemplate(root, 1, nsmap={ - Extended_server_attributes.alias: \ - Extended_server_attributes.namespace}) + alias = Extended_server_attributes.alias + namespace = Extended_server_attributes.namespace + return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace}) class ExtendedServerAttributesTemplate(xmlutil.TemplateBuilder): @@ -135,6 +135,6 @@ class ExtendedServerAttributesTemplate(xmlutil.TemplateBuilder): root = xmlutil.TemplateElement('servers') elem = xmlutil.SubTemplateElement(root, 'server', selector='servers') make_server(elem) - return xmlutil.SlaveTemplate(root, 1, nsmap={ - Extended_server_attributes.alias: \ - Extended_server_attributes.namespace}) + alias = Extended_server_attributes.alias + namespace = Extended_server_attributes.namespace + return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace}) diff --git a/nova/api/openstack/compute/contrib/flavorextradata.py b/nova/api/openstack/compute/contrib/flavorextradata.py index 9a07270ce..2864ada5e 100644 --- a/nova/api/openstack/compute/contrib/flavorextradata.py +++ b/nova/api/openstack/compute/contrib/flavorextradata.py @@ -55,8 +55,7 @@ class FlavorextradataController(wsgi.Controller): resp_obj.attach(xml=FlavorextradatumTemplate()) try: - flavor_ref = instance_types.\ - get_instance_type_by_flavor_id(id) + flavor_ref = instance_types.get_instance_type_by_flavor_id(id) except exception.FlavorNotFound: explanation = _("Flavor not found.") raise exception.HTTPNotFound(explanation=explanation) @@ -118,8 +117,9 @@ class FlavorextradatumTemplate(xmlutil.TemplateBuilder): def construct(self): root = xmlutil.TemplateElement('flavor', selector='flavor') make_flavor(root) - return xmlutil.SlaveTemplate(root, 1, nsmap={ - Flavorextradata.alias: Flavorextradata.namespace}) + alias = Flavorextradata.alias + namespace = Flavorextradata.namespace + return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace}) class FlavorextradataTemplate(xmlutil.TemplateBuilder): @@ -127,5 +127,6 @@ class FlavorextradataTemplate(xmlutil.TemplateBuilder): root = xmlutil.TemplateElement('flavors') elem = xmlutil.SubTemplateElement(root, 'flavor', selector='flavors') make_flavor(elem) - return xmlutil.SlaveTemplate(root, 1, nsmap={ - Flavorextradata.alias: Flavorextradata.namespace}) + alias = Flavorextradata.alias + namespace = Flavorextradata.namespace + return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace}) |
