Skip to content

Commit

Permalink
shell.py: Fix warning caused by overwriting cmd with str
Browse files Browse the repository at this point in the history
Signed-off-by: Bernhard Kaindl <[email protected]>
  • Loading branch information
bernhardkaindl committed Jun 17, 2024
1 parent 207f49c commit f604b1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/examples/python/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f604b1b

Please sign in to comment.