Browse Source

return boolean value according to the doc

return boolean value according to the doc
Jian Yu 8 years ago
parent
commit
4f6c3b5d18
1 changed files with 4 additions and 2 deletions
  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."""