Commit eccdf07a authored by Andrei Vagin's avatar Andrei Vagin

python fix lint warnings

flake8 started to report warnings like this:
test/zdtm.py:1337:6: W605 invalid escape sequence '\S'
Signed-off-by: 's avatarAndrei Vagin <avagin@gmail.com>
parent ae683919
......@@ -5,4 +5,5 @@
# E251 unexpected spaces around keyword / parameter equals
# E101 indentation contains mixed spaces and tabs
# E126 continuation line over-indented for hanging indent
ignore = W191,E128,E501,E251,E101,E126
# W504 line break after binary operator
ignore = W191,E128,E501,E251,E101,E126,W504
......@@ -122,7 +122,7 @@ def check_core_files():
if not reports:
return False
while subprocess.Popen("ps axf | grep 'abrt\.sh'", shell = True).wait() == 0:
while subprocess.Popen(r"ps axf | grep 'abrt\.sh'", shell = True).wait() == 0:
time.sleep(1)
for i in reports:
......@@ -189,7 +189,7 @@ class ns_flavor:
def __copy_libs(self, binary):
ldd = subprocess.Popen(["ldd", binary], stdout = subprocess.PIPE)
xl = re.compile('^(linux-gate.so|linux-vdso(64)?.so|not a dynamic|.*\s*ldd\s)')
xl = re.compile(r'^(linux-gate.so|linux-vdso(64)?.so|not a dynamic|.*\s*ldd\s)')
# This Mayakovsky-style code gets list of libraries a binary
# needs minus vdso and gate .so-s
......@@ -1334,7 +1334,7 @@ def get_visible_state(test):
cmounts = []
try:
r = re.compile("^\S+\s\S+\s\S+\s(\S+)\s(\S+)\s\S+\s[^-]*?(shared)?[^-]*?(master)?[^-]*?-")
r = re.compile(r"^\S+\s\S+\s\S+\s(\S+)\s(\S+)\s\S+\s[^-]*?(shared)?[^-]*?(master)?[^-]*?-")
with open("/proc/%s/root/proc/%s/mountinfo" % (test.getpid(), pid)) as mountinfo:
for m in mountinfo:
cmounts.append(r.match(m).groups())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment