modules: fix format-strings without interpolation
Fix all occurrences of format-strings without any interpolation. pylint warns about those (and for some reason did not do so for our modules). A followup will fix the pylint tests, so make sure all the warnings are resolved.
This commit is contained in:
parent
fe6e58aa12
commit
faaa6c1a6b
4 changed files with 7 additions and 7 deletions
|
|
@ -78,8 +78,8 @@ def main(tree, output_dir, options, loop_client):
|
|||
size = options["size"]
|
||||
fs_type = options.get("fs_type", "ext4")
|
||||
|
||||
image = f"/var/tmp/osbuild-image.raw"
|
||||
mountpoint = f"/tmp/osbuild-mnt"
|
||||
image = "/var/tmp/osbuild-image.raw"
|
||||
mountpoint = "/tmp/osbuild-mnt"
|
||||
|
||||
subprocess.run(["truncate", "--size", str(size), image], check=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import uuid
|
|||
|
||||
def ostree(*args, _input=None, **kwargs):
|
||||
args = list(args) + [f'--{k}={v}' for k, v in kwargs.items()]
|
||||
print(f"ostree " + " ".join(args), file=sys.stderr)
|
||||
print("ostree " + " ".join(args), file=sys.stderr)
|
||||
subprocess.run(["ostree"] + args,
|
||||
encoding="utf-8",
|
||||
stdout=sys.stderr,
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ SCHEMA = """
|
|||
|
||||
def ostree(*args, _input=None, **kwargs):
|
||||
args = list(args) + [f'--{k}={v}' for k, v in kwargs.items()]
|
||||
print(f"ostree " + " ".join(args), file=sys.stderr)
|
||||
print("ostree " + " ".join(args), file=sys.stderr)
|
||||
subprocess.run(["ostree"] + args,
|
||||
encoding="utf-8",
|
||||
stdout=sys.stderr,
|
||||
|
|
|
|||
|
|
@ -44,13 +44,13 @@ def main(tree, options):
|
|||
default_target = options.get("default_target")
|
||||
|
||||
for service in enabled_services:
|
||||
subprocess.run([f"systemctl", "--root", tree, "enable", service], check=True)
|
||||
subprocess.run(["systemctl", "--root", tree, "enable", service], check=True)
|
||||
|
||||
for service in disabled_services:
|
||||
subprocess.run([f"systemctl", "--root", tree, "disable", service], check=True)
|
||||
subprocess.run(["systemctl", "--root", tree, "disable", service], check=True)
|
||||
|
||||
if default_target:
|
||||
subprocess.run([f"systemctl", "--root", tree, "set-default", default_target], check=True)
|
||||
subprocess.run(["systemctl", "--root", tree, "set-default", default_target], check=True)
|
||||
|
||||
return 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue