Permalink
Browse files

fixed xml-rpc issues on methods returning none

  • Loading branch information...
1 parent c6eac1d commit 9143a35045213a0adf0006f35de364c969309a53 pjlantz committed Nov 28, 2010
Showing with 13 additions and 12 deletions.
  1. 0 src/certs/k.pem
  2. +1 −1 src/conf/hale.conf
  3. +12 −11 src/server.py
View
No changes.
View
@@ -6,7 +6,7 @@ port = 5000
listenhost = 127.0.0.1
port = 5000
key = key.pem
-cert = certificate.pem
+cert = cert.pem
[xmpp]
use = False
View
@@ -22,21 +22,19 @@
import BaseHTTPServer
import SimpleHTTPServer
import SimpleXMLRPCServer
-
-from conf import configHandler
-from modules import moduleManager
-from utils import moduleCoordinator
-from xmpp import producerBot
-from ConfigParser import *
-
import socket, os, base64
import sys, signal, threading, time
from OpenSSL import SSL
+os.environ["DJANGO_SETTINGS_MODULE"] = "webdb.settings"
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
-os.environ["DJANGO_SETTINGS_MODULE"] = "webdb.settings"
+from conf import configHandler
+from modules import moduleManager
+from utils import moduleCoordinator
+from xmpp import producerBot
+from ConfigParser import *
class ModuleDirChangeThread(threading.Thread):
"""
@@ -146,7 +144,7 @@ def do_POST(self):
# shut down the connection
self.wfile.flush()
- self.connection.shutdown() # Modified here!
+ self.connection.shutdown()
def authenticate_client(self):
if self.headers.has_key('Authorization'):
@@ -218,15 +216,17 @@ def execmod(self, arg):
errorStr = moduleManager.execute(args[0], args[1], arg3)
if len(errorStr) > 0:
return errorStr
+ return arg[1] + " started"
def stopmod(self, arg):
"""
Stop a specific module
"""
errorStr = moduleCoordinator.ModuleCoordinator().stop(arg)
- if len(errorStr) > 0:
+ if errorStr != None and len(errorStr) > 0:
return errorStr
+ print arg + " is now being stopped"
def lsexec(self, arg):
"""
@@ -267,8 +267,9 @@ def reloadmod(self, arg):
"""
errorStr = moduleManager.reload_module(arg)
- if len(errorStr) > 0:
+ if errorStr != None and len(errorStr) > 0:
return errorStr
+ return arg + " reloaded"
def useconf(self, arg):
"""

0 comments on commit 9143a35

Please sign in to comment.