Fix pylint warnings about string formatting

and one about unused exception value.
This commit is contained in:
Brian C. Lane 2021-09-27 09:08:37 -07:00
parent 49ff2c7d5c
commit f783ff77d4
3 changed files with 4 additions and 4 deletions

View File

@ -179,7 +179,7 @@ def main():
minimizer.filter() minimizer.filter()
except SystemExit as e: except SystemExit as e:
sys.exit(e.code) sys.exit(e.code)
except KeyboardInterrupt as e: except KeyboardInterrupt:
print("Aborted at user request") print("Aborted at user request")
if __name__ == "__main__": if __name__ == "__main__":

View File

@ -115,7 +115,7 @@ def main():
opts.image_type = "qcow2" opts.image_type = "qcow2"
if opts.image_type and not os.path.exists("/usr/bin/qemu-img"): if opts.image_type and not os.path.exists("/usr/bin/qemu-img"):
errors.append("image-type requires the qemu-img utility to be installed." % opts.image_type) errors.append("image-type option requires the qemu-img utility to be installed.")
if opts.image_type and opts.make_iso: if opts.image_type and opts.make_iso:
errors.append("image-type cannot be used to make a bootable iso.") errors.append("image-type cannot be used to make a bootable iso.")

View File

@ -170,14 +170,14 @@ def main():
for kv in opts.add_template_vars: for kv in opts.add_template_vars:
k, t, v = kv.partition('=') k, t, v = kv.partition('=')
if t == '': if t == '':
raise ValueError("Missing '=' for key=value in " % kv) raise ValueError("Missing '=' for key=value in %s" % kv)
parsed_add_template_vars[k] = v parsed_add_template_vars[k] = v
parsed_add_arch_template_vars = {} parsed_add_arch_template_vars = {}
for kv in opts.add_arch_template_vars: for kv in opts.add_arch_template_vars:
k, t, v = kv.partition('=') k, t, v = kv.partition('=')
if t == '': if t == '':
raise ValueError("Missing '=' for key=value in " % kv) raise ValueError("Missing '=' for key=value in %s" % kv)
parsed_add_arch_template_vars[k] = v parsed_add_arch_template_vars[k] = v
if 'SOURCE_DATE_EPOCH' in os.environ: if 'SOURCE_DATE_EPOCH' in os.environ: