소스 검색

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")