[Twisted-Python] internet.app reports worng errors on bind()ing
internet.app assumed 'port already bound' is the only error which can happen wen bind()ing. What's about 'premission denied' and all the others. This patch fixes that. drt http://c0re.jp/c0de/misc/twisted-0.15.0-bind-error.patch app gives a misleading errormessage when a error while binding to a port occures. This patch logs the error which actually has happended. --drt@un.bewaff.net - http://c0re.jp/ diff -u -r Twisted-0.15.0/twisted/internet/app.py Twisted/twisted/internet/app.py --- Twisted-0.15.0/twisted/internet/app.py Wed Jan 23 04:09:39 2002 +++ Twisted/twisted/internet/app.py Fri Feb 15 22:35:05 2002 @@ -348,8 +348,8 @@ for port in self.ports: try: port.startListening() - except socket.error: - log.msg('port %s already bound' % port.port) + except socket.error, msg: + log.msg('port %s: error: %s' % (port.port, msg[1])) return for connector in self.connectors: connector.startConnecting() -- teenage mutant ninja hero coders from da c0re - http://c0re.jp/ me - http://koeln.ccc.de/~drt/
participants (2)
-
drt@un.bewaff.net -
Itamar Shtull-Trauring