diff options
Diffstat (limited to 'designateclient/v2')
-rw-r--r-- | designateclient/v2/cli/common.py | 20 | ||||
-rw-r--r-- | designateclient/v2/cli/zones.py | 8 | ||||
-rw-r--r-- | designateclient/v2/recordsets.py | 4 |
3 files changed, 16 insertions, 16 deletions
diff --git a/designateclient/v2/cli/common.py b/designateclient/v2/cli/common.py index f8dbdfa..564af0d 100644 --- a/designateclient/v2/cli/common.py +++ b/designateclient/v2/cli/common.py @@ -74,20 +74,20 @@ def set_hard_delete(client, value): def set_all_common_headers(client, parsed_args): - if parsed_args.all_projects is not None and \ - isinstance(parsed_args.all_projects, bool): + if (parsed_args.all_projects is not None and + isinstance(parsed_args.all_projects, bool)): set_all_projects(client, parsed_args.all_projects) - if hasattr(parsed_args, 'edit_managed') and \ - parsed_args.edit_managed is not None and \ - isinstance(parsed_args.edit_managed, bool): + if (hasattr(parsed_args, 'edit_managed') and + parsed_args.edit_managed is not None and + isinstance(parsed_args.edit_managed, bool)): set_edit_managed(client, parsed_args.edit_managed) - if parsed_args.sudo_project_id is not None and \ - isinstance(parsed_args.sudo_project_id, str): + if (parsed_args.sudo_project_id is not None and + isinstance(parsed_args.sudo_project_id, str)): set_sudo_project_id(client, parsed_args.sudo_project_id) - if hasattr(parsed_args, 'hard_delete') and \ - parsed_args.hard_delete is not None and \ - isinstance(parsed_args.hard_delete, bool): + if (hasattr(parsed_args, 'hard_delete') and + parsed_args.hard_delete is not None and + isinstance(parsed_args.hard_delete, bool)): set_hard_delete(client, parsed_args.hard_delete) diff --git a/designateclient/v2/cli/zones.py b/designateclient/v2/cli/zones.py index 24f64de..d23d746 100644 --- a/designateclient/v2/cli/zones.py +++ b/designateclient/v2/cli/zones.py @@ -159,8 +159,8 @@ class CreateZoneCommand(command.ShowOne): k, v = attr.split(':') payload["attributes"][k] = v except ValueError: - msg = "Attribute '%s' is in an incorrect format. "\ - "Attributes are <key>:<value> formated" + msg = ("Attribute '%s' is in an incorrect format. " + "Attributes are <key>:<value> formated") raise osc_exc.CommandError(msg % attr) if parsed_args.type == 'PRIMARY': @@ -177,8 +177,8 @@ class CreateZoneCommand(command.ShowOne): elif parsed_args.type == 'SECONDARY': payload["masters"] = parsed_args.masters else: - msg = "Type %s is not supported. Please choose between " \ - "PRIMARY or SECONDARY" + msg = ("Type %s is not supported. Please choose between " + "PRIMARY or SECONDARY") raise osc_exc.CommandError(msg % parsed_args.type) data = client.zones.create( diff --git a/designateclient/v2/recordsets.py b/designateclient/v2/recordsets.py index 7ae2266..e6904fc 100644 --- a/designateclient/v2/recordsets.py +++ b/designateclient/v2/recordsets.py @@ -24,8 +24,8 @@ class RecordSetController(V2Controller): zone_info = None # If we get a zone name we'll need to get the ID of it before POST. - if isinstance(zone, str) and not \ - uuidutils.is_uuid_like(zone): + if (isinstance(zone, str) and not + uuidutils.is_uuid_like(zone)): zone_info = self.client.zones.get(zone) elif isinstance(zone, dict): zone_info = zone |