summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/prserv/serv.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py
index 1e170cea0a..1b08d59130 100644
--- a/bitbake/lib/prserv/serv.py
+++ b/bitbake/lib/prserv/serv.py
@@ -38,8 +38,17 @@ singleton = None
38class PRServer(SimpleXMLRPCServer): 38class PRServer(SimpleXMLRPCServer):
39 def __init__(self, dbfile, logfile, interface, daemon=True): 39 def __init__(self, dbfile, logfile, interface, daemon=True):
40 ''' constructor ''' 40 ''' constructor '''
41 SimpleXMLRPCServer.__init__(self, interface, 41 import socket
42 logRequests=False, allow_none=True) 42 try:
43 SimpleXMLRPCServer.__init__(self, interface,
44 logRequests=False, allow_none=True)
45 except socket.error:
46 ip=socket.gethostbyname(interface[0])
47 port=interface[1]
48 msg="PR Server unable to bind to %s:%s\n" % (ip, port)
49 sys.stderr.write(msg)
50 raise PRServiceConfigError
51
43 self.dbfile=dbfile 52 self.dbfile=dbfile
44 self.daemon=daemon 53 self.daemon=daemon
45 self.logfile=logfile 54 self.logfile=logfile