diff options
author | James Bowes <jbowes@redhat.com> | 2007-09-20 18:27:11 -0400 |
---|---|---|
committer | James Bowes <jbowes@redhat.com> | 2007-09-20 18:27:11 -0400 |
commit | 425f61b97305e9a44d9f31c8a82c633c95f61edc (patch) | |
tree | bbad54b3f58f60a62b418e361be08f23e410c695 /server/server.py | |
parent | d6b77d16f9a1e1acf8e8c65ef311657daef7bb05 (diff) | |
download | third_party-func-425f61b97305e9a44d9f31c8a82c633c95f61edc.tar.gz third_party-func-425f61b97305e9a44d9f31c8a82c633c95f61edc.tar.xz third_party-func-425f61b97305e9a44d9f31c8a82c633c95f61edc.zip |
Catch FuncException when the config file is missing and exit gracefully
Diffstat (limited to 'server/server.py')
-rwxr-xr-x | server/server.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/server.py b/server/server.py index 3069d0a..a313301 100755 --- a/server/server.py +++ b/server/server.py @@ -153,7 +153,11 @@ def main(argv): modules = module_loader.load_modules() print "modules", modules - websvc = XmlRpcInterface(modules=modules) + try: + websvc = XmlRpcInterface(modules=modules) + except FuncException, e: + print >> sys.stderr, 'error: %s' % e + sys.exit(1) if "daemon" in sys.argv or "--daemon" in sys.argv: utils.daemonize("/var/run/vf_server.pid") |