Kaydet (Commit) 71cc46e7 authored tarafından Fred Drake's avatar Fred Drake

Slight modernization.

üst cd874eda
......@@ -12,8 +12,6 @@
import http_server
import xmlrpclib
import regex
import string
import sys
class xmlrpc_handler:
......@@ -43,7 +41,7 @@ class xmlrpc_handler:
except:
# report exception back to server
response = xmlrpclib.dumps (
xmlrpclib.Fault (1, "%s:%s" % (sys.exc_type, sys.exc_value))
xmlrpclib.Fault (1, "%s:%s" % sys.exc_info()[:2])
)
else:
response = xmlrpclib.dumps (response, methodresponse=1)
......@@ -76,7 +74,7 @@ class collector:
if not cl:
request.error (411)
else:
cl = string.atoi (cl)
cl = int (cl)
# using a 'numeric' terminator
self.request.channel.set_terminator (cl)
......
......@@ -42,7 +42,7 @@ class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
except:
# report exception back to server
response = xmlrpclib.dumps(
xmlrpclib.Fault(1, "%s:%s" % (sys.exc_type, sys.exc_value))
xmlrpclib.Fault(1, "%s:%s" % sys.exc_info()[:2])
)
else:
response = xmlrpclib.dumps(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment