Misc pylint fixes that are reported usually once
This commit is contained in:
parent
bf9ed50d51
commit
e9e6e5701e
@ -191,7 +191,7 @@ if __name__ == "__main__":
|
||||
except SystemExit, e:
|
||||
sys.exit(e.code)
|
||||
except KeyboardInterrupt, e:
|
||||
print >> sys.stderr, _("Aborted at user request")
|
||||
print >> sys.stderr, "Aborted at user request"
|
||||
except Exception, e:
|
||||
print e
|
||||
sys.exit(1)
|
||||
|
@ -70,7 +70,7 @@ class ArchData(DataHolder):
|
||||
arm="arm", armhfp="arm")
|
||||
|
||||
def __init__(self, buildarch):
|
||||
self.buildarch = buildarch
|
||||
DataHolder.__init__(self, buildarch=buildarch)
|
||||
self.basearch = getBaseArch(buildarch)
|
||||
self.libdir = "lib64" if self.basearch in self.lib64_arches else "lib"
|
||||
self.bcj = self.bcj_arch.get(self.basearch)
|
||||
@ -143,7 +143,7 @@ class Lorax(BaseLoraxClass):
|
||||
|
||||
# remove some environmental variables that can cause problems with package scripts
|
||||
env_remove = ('DISPLAY', 'DBUS_SESSION_BUS_ADDRESS')
|
||||
[os.environ.pop(k) for k in env_remove if k in os.environ]
|
||||
_ = [os.environ.pop(k) for k in env_remove if k in os.environ]
|
||||
|
||||
self._configured = True
|
||||
|
||||
|
@ -67,7 +67,7 @@ def compress(command, rootdir, outfile, compression="xz", compressargs=None):
|
||||
except OSError as e:
|
||||
logger.error(e)
|
||||
# Kill off any hanging processes
|
||||
[p.kill() for p in (find, archive, comp) if p]
|
||||
_ = [p.kill() for p in (find, archive, comp) if p]
|
||||
return 1
|
||||
|
||||
def mkcpio(rootdir, outfile, compression="xz", compressargs=None):
|
||||
|
@ -61,7 +61,7 @@ class LogRequestHandler(SocketServer.BaseRequestHandler):
|
||||
|
||||
except socket.timeout:
|
||||
pass
|
||||
except:
|
||||
except Exception:
|
||||
break
|
||||
|
||||
def finish(self):
|
||||
|
@ -34,7 +34,7 @@ class LoraxDownloadCallback(yum.callbacks.DownloadBaseCallback):
|
||||
yum.callbacks.DownloadBaseCallback.__init__(self)
|
||||
self.output = output.LoraxOutput()
|
||||
|
||||
pattern = "\((?P<pkgno>\d+)/(?P<total>\d+)\):\s+(?P<pkgname>.*)"
|
||||
pattern = r"\((?P<pkgno>\d+)/(?P<total>\d+)\):\s+(?P<pkgname>.*)"
|
||||
self.pattern = re.compile(pattern)
|
||||
|
||||
def updateProgress(self, name, frac, fread, ftime):
|
||||
|
@ -26,6 +26,7 @@ class LoraxLintConfig(PocketLintConfig):
|
||||
self.falsePositives = [ FalsePositive(r"No name 'version' in module 'pylorax'"),
|
||||
FalsePositive(r"Module 'pylorax' has no 'version' member"),
|
||||
FalsePositive(r"Instance of 'int' has no .* member"),
|
||||
FalsePositive(r"Catching too general exception Exception"),
|
||||
]
|
||||
|
||||
@property
|
||||
|
Loading…
Reference in New Issue
Block a user