summaryrefslogtreecommitdiff
path: root/functionaltests/cli/v1/behaviors/base_behaviors.py
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.com>2020-03-28 15:30:28 +0100
committerAndreas Jaeger <aj@suse.com>2020-06-09 15:34:39 +0200
commita9913ea35fee4a8c2321718c9217047950e61517 (patch)
treefa2acbbac58622993b4d193687d989599a957839 /functionaltests/cli/v1/behaviors/base_behaviors.py
parent69a14917e5f98f82dd1f4cdf33a49e6f3f708c13 (diff)
downloadpython-barbicanclient-a9913ea35fee4a8c2321718c9217047950e61517.tar.gz
Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.1.0 which supports Python 3. Fix problems found. Change-Id: I54f9f7c5f6ee87ee886658388541f45e23c7546d
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