浏览代码

VERSION is not "stable" if it has a fourth string element.

Ask Solem 15 年之前
父节点
当前提交
9f19145062
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      celery/__init__.py

+ 5 - 5
celery/__init__.py

@@ -10,11 +10,11 @@ __docformat__ = "restructuredtext"
 
 
 def is_stable_release():
-    return bool(not VERSION[1] % 2)
+    if len(VERSION) > 3 and isinstance(VERSION[3], basestring):
+        return False
+    return not VERSION[1] % 2
 
 
 def version_with_meta():
-    meta = "unstable"
-    if is_stable_release():
-        meta = "stable"
-    return "%s (%s)" % (__version__, meta)
+    return "%s (%s)" % (__version__,
+                        is_stable_release() and "stable" or "unstable")