From cd7320d59ec7f6acc087507686a05711a59654bc Mon Sep 17 00:00:00 2001 From: "Krzysztof A. Adamski" Date: Mon, 7 Jul 2008 19:29:06 -0400 Subject: Print userfriendly error messages instead of tracebacks in case of permissions errors. --- scripts/func | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts') 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) -- cgit