Skip to content

Commit

Permalink
Make RPC port dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
m-meidani committed Feb 4, 2022
1 parent c383e96 commit 7cf009b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions query.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ def getImpactedTargetsByCommitAndCondition(self, commit_id, requestedConditions)
self.normalize)
return result

def startRPCServer(self):
def startRPCServer(self, port):
# Restrict to a particular path.
class RequestHandler(SimpleXMLRPCRequestHandler):
rpc_paths = ('/RPC2',)

# Create server
with SimpleXMLRPCServer(('localhost', 8008),
with SimpleXMLRPCServer(('localhost', port),
requestHandler=RequestHandler) as server:
server.register_introspection_functions()

Expand Down

0 comments on commit 7cf009b

Please sign in to comment.