Browse Source

PEP8ify + pyflakes

Ask Solem 14 years ago
parent
commit
f7e34ecb42
2 changed files with 1 additions and 5 deletions
  1. 0 1
      celery/backends/amqp.py
  2. 1 4
      celery/contrib/rdb.py

+ 0 - 1
celery/backends/amqp.py

@@ -12,7 +12,6 @@ from celery import states
 from celery.backends.base import BaseDictBackend
 from celery.backends.base import BaseDictBackend
 from celery.exceptions import TimeoutError
 from celery.exceptions import TimeoutError
 from celery.utils import timeutils
 from celery.utils import timeutils
-from celery.utils import cached_property
 
 
 
 
 def repair_uuid(s):
 def repair_uuid(s):

+ 1 - 4
celery/contrib/rdb.py

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