flake8: apply all rest E7 rules

This commit is contained in:
Yuming Zhu 2020-02-26 04:49:48 +08:00
parent 6ed30954b2
commit f1ba6cefd7
24 changed files with 112 additions and 127 deletions

View file

@ -238,7 +238,7 @@ def _try_read_cpuinfo():
mounted). """
try:
return open("/proc/cpuinfo", "r")
except:
except BaseException:
return []
@ -248,7 +248,7 @@ def _parse_auxv():
# In case we can't open and read /proc/self/auxv, just return
try:
data = open("/proc/self/auxv", "rb").read()
except:
except BaseException:
return
# Define values from /usr/include/elf.h
@ -323,7 +323,7 @@ def getCanonPPCArch(arch):
try:
if platform.startswith("power") and int(platform[5:].rstrip('+')) >= 7:
return "ppc64p7"
except:
except BaseException:
pass
if machine is None:
@ -388,7 +388,7 @@ def getCanonArch(skipRpmPlatform=0):
f.close()
(arch, vendor, opersys) = line.split("-", 2)
return arch
except:
except BaseException:
pass
arch = os.uname()[4]