Correct the regex for parsing output

Change-Id: I9f2c72e89bd7305277d7a531c719e02423e1dccb
Closes-Bug: #1651047
This commit is contained in:
Jeremy Liu
2016-12-19 15:28:32 +08:00
parent 978d3b43f3
commit 777b8b68f6

View File

@@ -125,7 +125,7 @@ class BaseBehaviors(object):
"""
retval = []
if str is not None and len(str) > 0:
rows = re.findall('\|(.*)?\n', str)
rows = re.findall('\|(.*?)\n', str)
# Remove header
header_row = rows.pop(0)
key_names = re.findall('\s*(.*?)\s*\|', header_row)