summaryrefslogtreecommitdiff
path: root/functionaltests/cli/v1/behaviors/base_behaviors.py
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-06-16 13:55:17 +0000
committerGerrit Code Review <review@openstack.org>2020-06-16 13:55:18 +0000
commitad2b85b4ed34add6afde47358ebd665a34c02c2a (patch)
tree87801fd1d3d54fb1e593fca580458a0ef39b7014 /functionaltests/cli/v1/behaviors/base_behaviors.py
parentdf7dbabb7dd63bc8066d9cc89955a510bf63b04d (diff)
parenta9913ea35fee4a8c2321718c9217047950e61517 (diff)
downloadpython-barbicanclient-ad2b85b4ed34add6afde47358ebd665a34c02c2a.tar.gz
Merge "Update hacking for Python3"
Diffstat (limited to 'functionaltests/cli/v1/behaviors/base_behaviors.py')
-rw-r--r--functionaltests/cli/v1/behaviors/base_behaviors.py8
1 files changed, 4 insertions, 4 deletions
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