aboutsummaryrefslogtreecommitdiffstats
path: root/tools/teststepstools.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-11-15 08:24:29 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-11-15 08:24:29 +0000
commit66a2773d89c689d1b8740aa2388164582e9ccb6c (patch)
tree6d427256960f314d8ac7152f7497f3f6ea033811 /tools/teststepstools.py
parent31770a64cd8a5c40ee3657ac97e87a900f7aeca5 (diff)
parentb1534957e463b5e34957a8d48ce5c6b0552ffbb4 (diff)
Merge "teststeps: Improvements and bugfixing of teststeps"
Diffstat (limited to 'tools/teststepstools.py')
-rw-r--r--tools/teststepstools.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/teststepstools.py b/tools/teststepstools.py
index 5d551c68..639e3437 100644
--- a/tools/teststepstools.py
+++ b/tools/teststepstools.py
@@ -15,10 +15,10 @@
"""Various helper functions for step driven testcases
"""
-import re
import logging
import subprocess
import locale
+from tools.functions import filter_output
_LOGGER = logging.getLogger(__name__)
@@ -93,11 +93,7 @@ class TestStepsTools(object):
output = output.decode(locale.getdefaultlocale()[1])
if regex:
- for line in output.split('\n'):
- result = re.findall(regex, line)
- if result:
- return result
- return []
+ return filter_output(output, regex)
return output