summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2011-03-29 00:55:27 +0000
committerTarmac <>2011-03-29 00:55:27 +0000
commit1d84aac3b13106aa3aa193a315e3d64751a47d7d (patch)
tree6c1ab2cf1a9f90247b786ae8a3ed06b19f063702
parente025ede777b0ee6652e035dfde467037f0485de2 (diff)
parentf67b18b61297b4cb0d641695de01e52fd37ddd1c (diff)
downloadnova-1d84aac3b13106aa3aa193a315e3d64751a47d7d.tar.gz
nova-1d84aac3b13106aa3aa193a315e3d64751a47d7d.tar.xz
nova-1d84aac3b13106aa3aa193a315e3d64751a47d7d.zip
Displays an error message to the user if an exception is raised. This is vital because if logfile is set, the exception shows up in the log and the user has no idea something went wrong.
-rwxr-xr-xbin/nova-manage11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/nova-manage b/bin/nova-manage
index cf0caf47e..f7308abe5 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -1098,8 +1098,8 @@ def main():
script_name = argv.pop(0)
if len(argv) < 1:
print script_name + " category action [<args>]"
- print "Available categories:"
- for k, _ in CATEGORIES:
+ print _("Available categories:")
+ for k, _v in CATEGORIES:
print "\t%s" % k
sys.exit(2)
category = argv.pop(0)
@@ -1110,7 +1110,7 @@ def main():
actions = methods_of(command_object)
if len(argv) < 1:
print script_name + " category action [<args>]"
- print "Available actions for %s category:" % category
+ print _("Available actions for %s category:") % category
for k, _v in actions:
print "\t%s" % k
sys.exit(2)
@@ -1122,9 +1122,12 @@ def main():
fn(*argv)
sys.exit(0)
except TypeError:
- print "Possible wrong number of arguments supplied"
+ print _("Possible wrong number of arguments supplied")
print "%s %s: %s" % (category, action, fn.__doc__)
raise
+ except:
+ print _("Command failed, please check log for more info")
+ raise
if __name__ == '__main__':
main()