mirror of
https://github.com/python/cpython.git
synced 2025-08-02 08:02:56 +00:00
Fixed following error when DocXMLRPCServer failed.
UnboundLocalError: local variable 'serv' referenced before assignment
This commit is contained in:
parent
ea00ed30df
commit
b7df32e620
1 changed files with 2 additions and 2 deletions
|
@ -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]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue