diff options
author | Zuul <zuul@review.opendev.org> | 2020-06-16 13:55:17 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2020-06-16 13:55:18 +0000 |
commit | ad2b85b4ed34add6afde47358ebd665a34c02c2a (patch) | |
tree | 87801fd1d3d54fb1e593fca580458a0ef39b7014 /functionaltests | |
parent | df7dbabb7dd63bc8066d9cc89955a510bf63b04d (diff) | |
parent | a9913ea35fee4a8c2321718c9217047950e61517 (diff) | |
download | python-barbicanclient-ad2b85b4ed34add6afde47358ebd665a34c02c2a.tar.gz |
Merge "Update hacking for Python3"
Diffstat (limited to 'functionaltests')
-rw-r--r-- | functionaltests/cli/v1/behaviors/acl_behaviors.py | 2 | ||||
-rw-r--r-- | functionaltests/cli/v1/behaviors/base_behaviors.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/functionaltests/cli/v1/behaviors/acl_behaviors.py b/functionaltests/cli/v1/behaviors/acl_behaviors.py index a9fc506..25478fd 100644 --- a/functionaltests/cli/v1/behaviors/acl_behaviors.py +++ b/functionaltests/cli/v1/behaviors/acl_behaviors.py @@ -48,7 +48,7 @@ class ACLBehaviors(base_behaviors.BaseBehaviors): argv.extend(['--project-access']) else: argv.extend(['--no-project-access']) - if operation_type and operation_type is not 'read': + if operation_type and operation_type != 'read': argv.extend([self._args_map_list['operation_type'][index], operation_type]) diff --git a/functionaltests/cli/v1/behaviors/base_behaviors.py b/functionaltests/cli/v1/behaviors/base_behaviors.py index 1c81723..3420cee 100644 --- a/functionaltests/cli/v1/behaviors/base_behaviors.py +++ b/functionaltests/cli/v1/behaviors/base_behaviors.py @@ -104,7 +104,7 @@ class BaseBehaviors(object): """ retval = {} if str is not None and len(str) > 0: - table_body = re.split('\+-*\+-*\+\n', str)[2:-1] + table_body = re.split(r'\+-*\+-*\+\n', str)[2:-1] lines = table_body[0].split('\n') for line in lines: if len(line) > 0: @@ -124,12 +124,12 @@ class BaseBehaviors(object): """ retval = [] if str is not None and len(str) > 0: - rows = re.findall('\|(.*?)\n', str) + rows = re.findall(r'\|(.*?)\n', str) # Remove header header_row = rows.pop(0) - key_names = re.findall('\s*(.*?)\s*\|', header_row) + key_names = re.findall(r'\s*(.*?)\s*\|', header_row) for row in rows: - values = re.findall('\s*(.*?)\s*\|', row) + values = re.findall(r'\s*(.*?)\s*\|', row) entry_dict = dict(zip(key_names, values)) retval.append(entry_dict) return retval |