Update things to make pylint 1.5.1 happy

This commit is contained in:
Brian C. Lane 2015-12-16 11:53:38 -08:00
parent ceabb7e214
commit a3097b3085
5 changed files with 6 additions and 14 deletions

View File

@ -204,8 +204,8 @@ def umount(mnt, lazy=False, maxretry=3, retrysleep=1.0):
count += 1
if count == maxretry:
raise
logger.warn("failed to unmount %s. retrying (%d/%d)...",
mnt, count, maxretry)
logger.warning("failed to unmount %s. retrying (%d/%d)...",
mnt, count, maxretry)
if logger.getEffectiveLevel() <= logging.DEBUG:
fuser = execWithCapture("fuser", ["-vm", mnt])
logger.debug("fuser -vm:\n%s\n", fuser)

View File

@ -185,8 +185,6 @@ class LoraxTemplateRunner(object):
If lorax is called with a debug repo find the corresponding debuginfo package
names and write them to /root/debubg-pkgs.log on the boot.iso
"""
# If any of the repos are debug repos then find the debuginfo packages
# and write their NVR's to a logfile for later use.
for repo in self.dbo.repos:
repo = self.dbo.repos[repo]
if any(True for url in repo.baseurl if "debug" in url):
@ -196,6 +194,7 @@ class LoraxTemplateRunner(object):
if repo.mirrorlist and "debug" in repo.mirrorlist:
break
else:
# No debug repos
return
available = self.dbo.sack.query().available()

View File

@ -532,7 +532,7 @@ def make_livecd(opts, mount_dir, work_dir):
isolabel = opts.volid or "{0.name}-{0.version}-{1.basearch}".format(product, arch)
if len(isolabel) > 32:
isolabel = isolabel[:32]
log.warn("Truncating isolabel to 32 chars: %s", isolabel)
log.warning("Truncating isolabel to 32 chars: %s", isolabel)
tb = TreeBuilder(product=product, arch=arch, domacboot=opts.domacboot,
inroot=mount_dir, outroot=work_dir,

View File

@ -14,13 +14,6 @@ class LoraxLintConfig(PocketLintConfig):
FalsePositive(r"ImageMinimizer.remove_rpm.runCallback: Unused argument .*")
]
@property
def disabledOptions(self):
return [ "I0011", # Locally disabling %s
"W0511", # FIXME/TODO/XXX
"W0141", # Used builtin function %s
]
@property
def pylintPlugins(self):
retval = super(LoraxLintConfig, self).pylintPlugins

View File

@ -34,8 +34,8 @@ data.basearch = data.arch.basearch
data.libdir = data.arch.libdir
def get_args(template):
argspec = inspect.getargspec(template.module.render_body)
return set(argspec.args[1:]) # skip "context"
sig = inspect.signature(template.module.render_body)
return set(list(sig.parameters)[1:]) # skip "context"
def readtemplate(filename):
parser = LoraxTemplate(directories=['.'])