From cffbc0d5aca2dc7d2b5305c329783394f98619fb Mon Sep 17 00:00:00 2001 From: zhongjun Date: Thu, 15 Jun 2017 17:23:05 +0800 Subject: [PATCH] Use parenthesis instead of backslashes in API folder Use parenthesis instead of backslashes in API folder TrivialFix Change-Id: I6c2ea07b0bfc5852b28e44989406cc10eb972e28 --- manila/api/v1/router.py | 4 ++-- manila/api/v1/shares.py | 4 ++-- manila/api/v2/share_networks.py | 8 ++++---- manila/api/v2/share_types.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/manila/api/v1/router.py b/manila/api/v1/router.py index 0130ed07e3..4eaeed10a5 100644 --- a/manila/api/v1/router.py +++ b/manila/api/v1/router.py @@ -120,8 +120,8 @@ class APIRouter(manila.api.openstack.APIRouter): mapper.resource("limit", "limits", controller=self.resources['limits']) - self.resources["security_services"] = \ - security_service.create_resource() + self.resources["security_services"] = ( + security_service.create_resource()) mapper.resource("security-service", "security-services", controller=self.resources['security_services'], collection={'detail': 'GET'}) diff --git a/manila/api/v1/shares.py b/manila/api/v1/shares.py index c71c3fd911..aa49416c3b 100644 --- a/manila/api/v1/shares.py +++ b/manila/api/v1/shares.py @@ -272,8 +272,8 @@ class ShareMixin(object): parent_share_net_id = parent_share.instance['share_network_id'] if share_network_id: if share_network_id != parent_share_net_id: - msg = "Share network ID should be the same as snapshot's" \ - " parent share's or empty" + msg = ("Share network ID should be the same as snapshot's" + " parent share's or empty") raise exc.HTTPBadRequest(explanation=msg) elif parent_share_net_id: share_network_id = parent_share_net_id diff --git a/manila/api/v2/share_networks.py b/manila/api/v2/share_networks.py index b734bad3fe..c9956df12d 100644 --- a/manila/api/v2/share_networks.py +++ b/manila/api/v2/share_networks.py @@ -207,10 +207,10 @@ class ShareNetworkController(wsgi.Controller): if share_network['share_servers']: for value in update_values: if value not in ['name', 'description']: - msg = _("Cannot update share network %s. It is used by " - "share servers. Only 'name' and 'description' " - "fields are available for update")\ - % share_network['id'] + msg = (_("Cannot update share network %s. It is used by " + "share servers. Only 'name' and 'description' " + "fields are available for update") % + share_network['id']) raise exc.HTTPForbidden(explanation=msg) try: diff --git a/manila/api/v2/share_types.py b/manila/api/v2/share_types.py index e28a81be03..80a243f434 100644 --- a/manila/api/v2/share_types.py +++ b/manila/api/v2/share_types.py @@ -143,8 +143,8 @@ class ShareTypesController(wsgi.Controller): """Creates a new share type.""" context = req.environ['manila.context'] - if not self.is_valid_body(body, 'share_type') and \ - not self.is_valid_body(body, 'volume_type'): + if (not self.is_valid_body(body, 'share_type') and + not self.is_valid_body(body, 'volume_type')): raise webob.exc.HTTPBadRequest() elif self.is_valid_body(body, 'share_type'):