From d446cde260e31289b3448d42873f32241e8444e9 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 28 Jan 2021 10:20:25 +0100 Subject: [PATCH] examples/python: some style update to avoid changes in black code formatting Fedora 33's version of python-black is the authoritative version we use for formatting -- note that formatting may look different depending on the black version. Recently, the package was updated to 20.8~b1-1.fc33, which treats these lines different. Work around that by adjusting the code so that both older and current versions of python black behave the same. --- examples/python/gi/ovs-external-ids.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/python/gi/ovs-external-ids.py b/examples/python/gi/ovs-external-ids.py index 5255e45062..63f9695ea6 100755 --- a/examples/python/gi/ovs-external-ids.py +++ b/examples/python/gi/ovs-external-ids.py @@ -189,7 +189,7 @@ def ovs_print_external_ids(prefix): out = "" for cmd in cmds: - p = subprocess.run(cmd, stdout=subprocess.PIPE, check=True,) + p = subprocess.run(cmd, stdout=subprocess.PIPE, check=True) out += p.stdout.decode("utf-8") + "\n" out = "\n".join([prefix + s for s in out.split("\n")]) _print(out) @@ -636,7 +636,7 @@ if __name__ == "__main__": if len(devices) != 1: _print( "To apply the external-ids of a device, exactly one connection must be selected. Instead, %s devices matched ([%s])" - % (len(devices), ", ".join([device_to_str(c) for c in devices]),) + % (len(devices), ", ".join([device_to_str(c) for c in devices])) ) die_usage("Select unique device to apply") do_apply(nmc, devices[0], args["ids_arg"], do_test=args["do_test"])