fix debug messages on UPnP binding
This commit is contained in:
parent
285af11af7
commit
4fd2ae599c
|
@ -298,18 +298,18 @@ class upnp_broadcast_responder(object):
|
|||
|
||||
try:
|
||||
self.ssock.bind(('', self.port))
|
||||
except Exception, e:
|
||||
dbg("WARNING: Failed to bind %s:%d: %s", (self.ip, self.port, e))
|
||||
except Exception as e:
|
||||
dbg("WARNING: Failed to bind %s:%d: %s" % (self.ip, self.port, e))
|
||||
ok = False
|
||||
|
||||
try:
|
||||
self.ssock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, self.mreq)
|
||||
except Exception, e:
|
||||
dbg('WARNING: Failed to join multicast group:', e)
|
||||
except Exception as e:
|
||||
dbg('WARNING: Failed to join multicast group: %s' % str(e))
|
||||
ok = False
|
||||
|
||||
except Exception, e:
|
||||
dbg("Failed to initialize UPnP sockets:", e)
|
||||
except Exception as e:
|
||||
dbg("Failed to initialize UPnP sockets: %s" % str(e))
|
||||
return False
|
||||
if ok:
|
||||
dbg("Listening for UPnP broadcasts")
|
||||
|
|
Loading…
Reference in New Issue
Block a user