From f604b1b2e191e020ca0e85a90a68d50cfa2366f2 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl Date: Mon, 17 Jun 2024 12:00:00 +0200 Subject: [PATCH] shell.py: Fix warning caused by overwriting cmd with str Signed-off-by: Bernhard Kaindl --- scripts/examples/python/shell.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/examples/python/shell.py b/scripts/examples/python/shell.py index 6e5e4f8ff27..100ed35ac51 100644 --- a/scripts/examples/python/shell.py +++ b/scripts/examples/python/shell.py @@ -103,10 +103,10 @@ def munge_types (str): # We want to support directly executing the cmd line, # where appropriate if len(sys.argv) > cmdAt: - cmd = sys.argv[cmdAt] + command = sys.argv[cmdAt] params = [munge_types(x) for x in sys.argv[(cmdAt + 1):]] try: - print(session.xenapi_request(cmd, tuple(params)), file=sys.stdout) + print(session.xenapi_request(command, tuple(params)), file=sys.stdout) except XenAPI.Failure as x: print(x, file=sys.stderr) sys.exit(2)