Fix pylint warnings about string formatting
and one about unused exception value.
(cherry picked from commit f783ff77d4
)
This commit is contained in:
parent
16b76846c6
commit
d03749ea98
@ -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__":
|
||||||
|
@ -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.")
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user