瀏覽代碼

Set __package__ the same way in celeryd as elsewhere

This fixes a NameError on __package__ that got me on Python 2.5
Martin Melin 13 年之前
父節點
當前提交
7b5abb5fbc
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      celery/bin/celeryd.py

+ 1 - 1
celery/bin/celeryd.py

@@ -73,7 +73,7 @@
 """
 from __future__ import absolute_import
 
-if "__main__" and __package__ is None:
+if __name__ == "__main__" and __package__ is None:
     __package__ = "celery.bin.celeryd"
 
 import sys