summaryrefslogtreecommitdiffstats
path: root/yardstick/common/task_template.py
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-01-25 16:15:52 -0800
committerRoss Brattain <ross.b.brattain@intel.com>2017-02-08 06:51:04 +0000
commitc6d584f5e050cf79eb640bae3d6ca36e2788890f (patch)
treebf4a69eb9f51e989947e80a7339a11429b9bf3b9 /yardstick/common/task_template.py
parenta4241e6e9b121447a50fdfe0d79b322c2e2aaea9 (diff)
pylint fixes: remove redundant parens, fix comparison order
removed redundant parens in if and while clauses use var != constant, not constant != var. Python doesn't allow for assignment in if statements, so we don't have to use the old C workarounds remove unwanted commas use raw strings for regexps with backslashes, e.g. r'\s' instead of '\s' Change-Id: I7aad645dd3d7f4b4b62f4e4510a425611c9d28f2 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'yardstick/common/task_template.py')
-rwxr-xr-xyardstick/common/task_template.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yardstick/common/task_template.py b/yardstick/common/task_template.py
index bda8a1b13..9acc21336 100755
--- a/yardstick/common/task_template.py
+++ b/yardstick/common/task_template.py
@@ -45,11 +45,11 @@ def is_really_missing(mis, task_template):
# Removing variables that have default values from
# missing. Construction that won't be properly
# check is {% set x = x or 1}
- if re.search(mis.join(["{%\s*set\s+", "\s*=\s*", "[^\w]+"]),
+ if re.search(mis.join([r"{%\s*set\s+", "\s*=\s*", r"[^\w]+"]),
task_template):
return False
# Also check for a default filter which can show up as
# a missing variable
- if re.search(mis + "\s*\|\s*default\(", task_template):
+ if re.search(mis + r"\s*\|\s*default\(", task_template):
return False
return True