Fixed following error when DocXMLRPCServer failed.

UnboundLocalError: local variable 'serv' referenced before assignment
This commit is contained in:
Hirokazu Yamamoto 2008-10-03 16:18:42 +00:00
parent ea00ed30df
commit b7df32e620
1 changed files with 2 additions and 2 deletions

View File

@ -9,9 +9,9 @@ import xmlrpclib
PORT = None
def server(evt, numrequests):
try:
serv = DocXMLRPCServer(("localhost", 0), logRequests=False)
serv = DocXMLRPCServer(("localhost", 0), logRequests=False)
try:
global PORT
PORT = serv.socket.getsockname()[1]