Fix pylint warnings about string formatting

and one about unused exception value.

(cherry picked from commit f783ff77d4)
This commit is contained in:
Brian C. Lane 2021-09-27 09:08:37 -07:00
parent 16b76846c6
commit d03749ea98
3 changed files with 4 additions and 4 deletions

View File

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

View File

@ -115,7 +115,7 @@ def main():
opts.image_type = "qcow2"
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:
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:
k, t, v = kv.partition('=')
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_arch_template_vars = {}
for kv in opts.add_arch_template_vars:
k, t, v = kv.partition('=')
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
if 'SOURCE_DATE_EPOCH' in os.environ: