diff options
author | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-07-07 19:29:06 -0400 |
---|---|---|
committer | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-07-08 00:25:59 +0200 |
commit | cd7320d59ec7f6acc087507686a05711a59654bc (patch) | |
tree | 2583424af6904418c5b1f7115df24356c52948e9 /scripts | |
parent | 4a5de2e60b8173c19ef0eaa7eec4460d904a3bd2 (diff) | |
download | func-cd7320d59ec7f6acc087507686a05711a59654bc.tar.gz func-cd7320d59ec7f6acc087507686a05711a59654bc.tar.xz func-cd7320d59ec7f6acc087507686a05711a59654bc.zip |
Print userfriendly error messages instead of tracebacks in case of permissions errors.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/func | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/func b/scripts/func index dcc4561..da2f50e 100755 --- a/scripts/func +++ b/scripts/func @@ -16,6 +16,7 @@ import sys import distutils.sysconfig +from func.CommonErrors import Func_Client_Exception # sys.path.append("%s/func" % distutils.sysconfig.get_python_lib()) @@ -23,6 +24,10 @@ import func.overlord.func_command as func_command myname, argv = sys.argv[0], sys.argv[1:] cli = func_command.FuncCommandLine() -cli.parse(argv) +try: + cli.parse(argv) +except Func_Client_Exception, e: + print "ERROR:", e + sys.exit(1) |