diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2011-06-15 18:44:12 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2011-06-15 18:44:12 -0500 |
commit | 5e4ad67b39a175759251d9e9bfc4b93c64d5dd36 (patch) | |
tree | b6f8534f66b6ee323431637d7f3875c63c26cdc8 | |
parent | f4307fd49519f4f086a5674c255174880a8b2b18 (diff) | |
download | bcfg2-5e4ad67b39a175759251d9e9bfc4b93c64d5dd36.tar.gz bcfg2-5e4ad67b39a175759251d9e9bfc4b93c64d5dd36.tar.bz2 bcfg2-5e4ad67b39a175759251d9e9bfc4b93c64d5dd36.zip |
SSLServer: Fix errors reported by emias on IRC
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
-rw-r--r-- | src/lib/SSLServer.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/SSLServer.py b/src/lib/SSLServer.py index d5d2f2b3a..21bf48d3e 100644 --- a/src/lib/SSLServer.py +++ b/src/lib/SSLServer.py @@ -47,7 +47,8 @@ class XMLRPCDispatcher (SimpleXMLRPCServer.SimpleXMLRPCDispatcher): params = (address, ) + params response = self.instance._dispatch(method, params, self.funcs) # py3k compatibility - if isinstance(response, bool) or isinstance(response, str): + if isinstance(response, bool) or isinstance(response, str) \ + or isinstance(response, list): response = (response, ) else: response = (response.decode('utf-8'), ) @@ -252,7 +253,8 @@ class XMLRPCRequestHandler (SimpleXMLRPCServer.SimpleXMLRPCRequestHandler): data = ''.join(L) response = self.server._marshaled_dispatch(self.client_address, data) - response = response.encode('utf-8') + if sys.hexversion >= 0x03000000: + response = response.encode('utf-8') except: try: self.send_response(500) |