Explorar o código

return boolean value according to the doc

return boolean value according to the doc
Jian Yu %!s(int64=8) %!d(string=hai) anos
pai
achega
4f6c3b5d18
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      celery/platforms.py

+ 4 - 2
celery/platforms.py

@@ -632,9 +632,11 @@ class Signals(object):
     def supported(self, name):
         """Return true value if signal by ``name`` exists on this platform."""
         try:
-            return self.signum(name)
+            self.signum(name)
         except AttributeError:
-            pass
+            return False
+        else:
+            return True
 
     def signum(self, name):
         """Get signal number by name."""