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:
|
try:
|
||||||
self.ssock.bind(('', self.port))
|
self.ssock.bind(('', self.port))
|
||||||
except Exception, e:
|
except Exception as e:
|
||||||
dbg("WARNING: Failed to bind %s:%d: %s", (self.ip, self.port, e))
|
dbg("WARNING: Failed to bind %s:%d: %s" % (self.ip, self.port, e))
|
||||||
ok = False
|
ok = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.ssock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, self.mreq)
|
self.ssock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, self.mreq)
|
||||||
except Exception, e:
|
except Exception as e:
|
||||||
dbg('WARNING: Failed to join multicast group:', e)
|
dbg('WARNING: Failed to join multicast group: %s' % str(e))
|
||||||
ok = False
|
ok = False
|
||||||
|
|
||||||
except Exception, e:
|
except Exception as e:
|
||||||
dbg("Failed to initialize UPnP sockets:", e)
|
dbg("Failed to initialize UPnP sockets: %s" % str(e))
|
||||||
return False
|
return False
|
||||||
if ok:
|
if ok:
|
||||||
dbg("Listening for UPnP broadcasts")
|
dbg("Listening for UPnP broadcasts")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user