Merge "Fix some syntax errors."
This commit is contained in:
commit
2a23ca40f4
@ -31,8 +31,8 @@ def print_help():
|
|||||||
"""Help for CLI"""
|
"""Help for CLI"""
|
||||||
print "\nNVP Plugin Commands:"
|
print "\nNVP Plugin Commands:"
|
||||||
for key in COMMANDS.keys():
|
for key in COMMANDS.keys():
|
||||||
print " %s %s" %
|
print (" %s %s" %
|
||||||
(key, " ".join(["<%s>" % y for y in COMMANDS[key]["args"]]))
|
(key, " ".join(["<%s>" % y for y in COMMANDS[key]["args"]])))
|
||||||
|
|
||||||
|
|
||||||
def build_args(cmd, cmdargs, arglist):
|
def build_args(cmd, cmdargs, arglist):
|
||||||
@ -46,14 +46,14 @@ def build_args(cmd, cmdargs, arglist):
|
|||||||
except:
|
except:
|
||||||
LOG.error("Not enough arguments for \"%s\" (expected: %d, got: %d)" % (
|
LOG.error("Not enough arguments for \"%s\" (expected: %d, got: %d)" % (
|
||||||
cmd, len(cmdargs), len(orig_arglist)))
|
cmd, len(cmdargs), len(orig_arglist)))
|
||||||
print "Usage:\n %s %s" %
|
print ("Usage:\n %s %s" %
|
||||||
(cmd, " ".join(["<%s>" % y for y in COMMANDS[cmd]["args"]]))
|
(cmd, " ".join(["<%s>" % y for y in COMMANDS[cmd]["args"]])))
|
||||||
sys.exit()
|
sys.exit()
|
||||||
if len(arglist) > 0:
|
if len(arglist) > 0:
|
||||||
LOG.error("Too many arguments for \"%s\" (expected: %d, got: %d)" % (
|
LOG.error("Too many arguments for \"%s\" (expected: %d, got: %d)" % (
|
||||||
cmd, len(cmdargs), len(orig_arglist)))
|
cmd, len(cmdargs), len(orig_arglist)))
|
||||||
print "Usage:\n %s %s" %
|
print ("Usage:\n %s %s" %
|
||||||
(cmd, " ".join(["<%s>" % y for y in COMMANDS[cmd]["args"]]))
|
(cmd, " ".join(["<%s>" % y for y in COMMANDS[cmd]["args"]])))
|
||||||
sys.exit()
|
sys.exit()
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user