Skip to content
Browse files

Fix Python 2.5 compatibility (__package__ not defined) Issue #638

  • Loading branch information...
1 parent 917be2f commit 2cbf64730acd0c2f04ea96e6c734453e7f1e779f @ulricheck committed Mar 18, 2012
View
1 README
View
1 README
@@ -0,0 +1 @@
+README.rst
View
5 celery/bin/camqadm.py
@@ -6,7 +6,10 @@
"""
from __future__ import absolute_import
-if __name__ == "__main__" and __package__ is None:
+try:
+ if __name__ == "__main__" and __package__ is None:
+ __package__ = "celery.bin.celeryctl"
+except NameError:
__package__ = "celery.bin.celeryctl"
import cmd
View
5 celery/bin/celerybeat.py
@@ -25,7 +25,10 @@
from __future__ import with_statement
from __future__ import absolute_import
-if __name__ == "__main__" and __package__ is None:
+try:
+ if __name__ == "__main__" and __package__ is None:
+ __package__ = "celery.bin.celerybeat"
+except NameError:
__package__ = "celery.bin.celerybeat"
import os
View
5 celery/bin/celeryctl.py
@@ -2,7 +2,10 @@
from __future__ import absolute_import
from __future__ import with_statement
-if __name__ == "__main__" and __package__ is None:
+try:
+ if __name__ == "__main__" and __package__ is None:
+ __package__ = "celery.bin.celeryctl"
+except NameError:
__package__ = "celery.bin.celeryctl"
import sys
View
5 celery/bin/celeryd.py
@@ -73,7 +73,10 @@
"""
from __future__ import absolute_import
-if __name__ == "__main__" and __package__ is None:
+try:
+ if __name__ == "__main__" and __package__ is None:
+ __package__ = "celery.bin.celeryd"
+except NameError:
__package__ = "celery.bin.celeryd"
import sys
View
5 celery/bin/celeryd_detach.py
@@ -2,7 +2,10 @@
from __future__ import absolute_import
from __future__ import with_statement
-if __name__ == "__main__" and __package__ is None:
+try:
+ if __name__ == "__main__" and __package__ is None:
+ __package__ = "celery.bin.celeryd_detach"
+except NameError:
__package__ = "celery.bin.celeryd_detach"
import os
View
6 celery/bin/celeryd_multi.py
@@ -88,9 +88,13 @@
"""
from __future__ import absolute_import
-if __name__ == "__main__" and __package__ is None:
+try:
+ if __name__ == "__main__" and __package__ is None:
+ __package__ = "celery.bin.celeryd_multi"
+except NameError:
__package__ = "celery.bin.celeryd_multi"
+
import errno
import os
import signal
View
6 celery/bin/celeryev.py
@@ -2,9 +2,13 @@
from __future__ import absolute_import
from __future__ import with_statement
-if __name__ == "__main__" and __package__ is None:
+try:
+ if __name__ == "__main__" and __package__ is None:
+ __package__ = "celery.bin.celeryev"
+except NameError:
__package__ = "celery.bin.celeryev"
+
import os
import sys
View
1 contrib/requirements
View
1 contrib/requirements
@@ -0,0 +1 @@
+../requirements
View
1 docs/changelog.rst
@@ -0,0 +1 @@
+../Changelog
View
1 docs/changelog.rst
View
1 docs/faq.rst
View
1 docs/faq.rst
@@ -0,0 +1 @@
+../FAQ

0 comments on commit 2cbf647

Please sign in to comment.
Something went wrong with that request. Please try again.