|
@@ -37,7 +37,6 @@ Inspired by http://snippets.dzone.com/posts/show/7248
|
|
|
|
|
|
"""
|
|
|
|
|
|
-import bdb
|
|
|
import errno
|
|
|
import os
|
|
|
import socket
|
|
@@ -90,7 +89,6 @@ class Rdb(Pdb):
|
|
|
"%s: Could not find available port. Please set using "
|
|
|
"environment variable CELERY_RDB_PORT" % (self.me, ))
|
|
|
|
|
|
-
|
|
|
self._sock.listen(1)
|
|
|
me = "%s:%s" % (self.me, this_port)
|
|
|
context = self.context = {"me": me, "host": host, "port": this_port}
|
|
@@ -132,7 +130,7 @@ class Rdb(Pdb):
|
|
|
Pdb.set_trace(self, frame)
|
|
|
except socket.error, exc:
|
|
|
# connection reset by peer.
|
|
|
- if socket.errno != ECONNRESET:
|
|
|
+ if exc.errno != errno.ECONNRESET:
|
|
|
raise
|
|
|
|
|
|
def set_quit(self):
|
|
@@ -140,7 +138,6 @@ class Rdb(Pdb):
|
|
|
sys.settrace(None)
|
|
|
|
|
|
|
|
|
-
|
|
|
def debugger():
|
|
|
"""Returns the current debugger instance (if any),
|
|
|
or creates a new one."""
|