summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorAdrian Likins <alikins@redhat.com>2007-09-20 18:46:39 -0400
committerAdrian Likins <alikins@redhat.com>2007-09-20 18:46:39 -0400
commitc52285088c7b1c5744e26ac43e2faf0f1b302585 (patch)
tree82540d9c852a28eab24c473bb180233e3a5b89e5 /server
parentbfc12e218fa56755aa37338c5aa36feee632ed49 (diff)
parent74d7edb0c56505eaf657565a95eb209ea09a3b8f (diff)
downloadthird_party-func-c52285088c7b1c5744e26ac43e2faf0f1b302585.tar.gz
third_party-func-c52285088c7b1c5744e26ac43e2faf0f1b302585.tar.xz
third_party-func-c52285088c7b1c5744e26ac43e2faf0f1b302585.zip
Merge branch 'master' of ssh://git.fedoraproject.org/git/hosted/func
Diffstat (limited to 'server')
-rwxr-xr-xserver/config_data.py2
-rwxr-xr-xserver/module_loader.py2
-rwxr-xr-xserver/server.py7
3 files changed, 8 insertions, 3 deletions
diff --git a/server/config_data.py b/server/config_data.py
index b9a4bc8..7ace8ca 100755
--- a/server/config_data.py
+++ b/server/config_data.py
@@ -35,7 +35,7 @@ class Config:
def read(self):
if not os.path.exists(CONFIG_FILE):
- raise FuncException(comment="Missing %s" % CONFIG_FILE)
+ raise FuncException("Missing %s" % CONFIG_FILE)
cp = ConfigParser.ConfigParser()
diff --git a/server/module_loader.py b/server/module_loader.py
index a18da35..f189623 100755
--- a/server/module_loader.py
+++ b/server/module_loader.py
@@ -47,7 +47,7 @@ def load_modules(blacklist=None):
try:
blip = __import__("modules.%s" % ( modname), globals(), locals(), [modname])
if not hasattr(blip, "register_rpc"):
- errmsg = _("%(module_path)s/%(modname)s module not a proper module")
+ errmsg = _("%(module_path)s%(modname)s module not a proper module")
print errmsg % {'module_path': module_file_path, 'modname':modname}
continue
mods[modname] = blip
diff --git a/server/server.py b/server/server.py
index 6179d86..d6fffd5 100755
--- a/server/server.py
+++ b/server/server.py
@@ -132,6 +132,7 @@ def serve(websvc):
"""
server =FuncXMLRPCServer(('', 51234))
+ server.logRequests = 0 # don't print stuff to console
server.register_instance(websvc)
server.serve_forever()
@@ -155,7 +156,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")