Commit d8a061b5 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

Catch exceptions in kamaki cli.

parent 288b2999
......@@ -2,6 +2,7 @@
from kamaki.cli.commands import _command_init
from kamaki.cli import command
from kamaki.cli.errors import CLIError
class cli_generator(object):
......@@ -40,8 +41,11 @@ class cli_generator(object):
def main(this, *args):
this.init()
r = this.call(method, args)
print r
try:
r = this.call(method, args)
print r
except Exception as e:
raise CLIError ('%s: %s\n' % (self.appname, e))
C.__name__ = self.appname + '_' + method
return C
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment