diff options
author | Andreas Jaeger <aj@suse.com> | 2020-03-28 15:38:59 +0100 |
---|---|---|
committer | Andreas Jaeger <jaegerandi@gmail.com> | 2020-03-31 10:04:12 +0000 |
commit | 9dede4eb2b824b21c0031507bd986796f535810c (patch) | |
tree | f7b608f8e48da9b3318137662470ef12a11d9f71 /heatclient/common | |
parent | 6b071d397e9ba8ff81962f5709f3d14d6408dd2f (diff) | |
download | python-heatclient-9dede4eb2b824b21c0031507bd986796f535810c.tar.gz |
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found.
Change-Id: I82c745f5b1236844deec4538be84037a64eebeee
Diffstat (limited to 'heatclient/common')
-rw-r--r-- | heatclient/common/event_utils.py | 4 | ||||
-rw-r--r-- | heatclient/common/http.py | 2 | ||||
-rw-r--r-- | heatclient/common/template_format.py | 2 | ||||
-rw-r--r-- | heatclient/common/utils.py | 4 |
4 files changed, 7 insertions, 5 deletions
diff --git a/heatclient/common/event_utils.py b/heatclient/common/event_utils.py index 8551b56..c4095b6 100644 --- a/heatclient/common/event_utils.py +++ b/heatclient/common/event_utils.py @@ -182,9 +182,9 @@ def poll_for_events(hc, stack_name, action=None, poll_period=5, marker=None, if action: stop_status = ('%s_FAILED' % action, '%s_COMPLETE' % action) - stop_check = lambda a: a in stop_status + stop_check = lambda a: a in stop_status # noqa: E731 else: - stop_check = lambda a: a.endswith('_COMPLETE') or a.endswith('_FAILED') + stop_check = lambda a: a.endswith('_COMPLETE') or a.endswith('_FAILED') # noqa E731 no_event_polls = 0 msg_template = _("\n Stack %(name)s %(status)s \n") diff --git a/heatclient/common/http.py b/heatclient/common/http.py index 1f86c24..3a85bc5 100644 --- a/heatclient/common/http.py +++ b/heatclient/common/http.py @@ -340,7 +340,7 @@ class SessionClient(adapter.LegacyJsonAdapter): raise exc.InvalidEndpoint(message=message) if (self.endpoint_override is not None and location.lower().startswith(self.endpoint_override.lower())): - return location[len(self.endpoint_override):] + return location[len(self.endpoint_override):] else: return location diff --git a/heatclient/common/template_format.py b/heatclient/common/template_format.py index fb275f6..6aaf1e0 100644 --- a/heatclient/common/template_format.py +++ b/heatclient/common/template_format.py @@ -39,6 +39,8 @@ def _construct_yaml_str(self, node): # Override the default string handling function # to always return unicode objects return self.construct_scalar(node) + + yaml_loader.add_constructor(u'tag:yaml.org,2002:str', _construct_yaml_str) # Unquoted dates like 2013-05-23 in yaml files get loaded as objects of type # datetime.data which causes problems in API layer when being processed by diff --git a/heatclient/common/utils.py b/heatclient/common/utils.py index ae32514..cb2cb88 100644 --- a/heatclient/common/utils.py +++ b/heatclient/common/utils.py @@ -377,8 +377,8 @@ def format_parameter_file(param_files, template_file=None, param_file = {} for key, value in params.items(): - param_file[key] = resolve_param_get_file(value, - template_base_url) + param_file[key] = resolve_param_get_file(value, + template_base_url) return param_file |