mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-20 16:51:37 +00:00
python fix lint warnings
flake8 started to report warnings like this: test/zdtm.py:1337:6: W605 invalid escape sequence '\S' Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
parent
ae6839194a
commit
eccdf07ae3
2 changed files with 5 additions and 4 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue