Ask Solem 13 年之前
父节点
当前提交
b87956d218
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      celery/backends/mongodb.py

+ 2 - 2
celery/backends/mongodb.py

@@ -77,8 +77,8 @@ class MongoBackend(BaseDictBackend):
             # This enables the use of replica sets and sharding.
             # See pymongo.Connection() for more info.
             args = [self.mongodb_host]
-            if (isinstance(self.mongodb_host, basestring) and
-                not self.mongodb_host.startswith('mongodb://')):
+            if isinstance(self.mongodb_host, basestring) \
+                    and not self.mongodb_host.startswith("mongodb://"):
                 args.append(self.mongodb_port)
 
             self._connection = Connection(*args)