瀏覽代碼

Cosmetics

Ask Solem 13 年之前
父節點
當前提交
966ac1cff9
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      celery/bin/celeryctl.py

+ 1 - 2
celery/bin/celeryctl.py

@@ -122,8 +122,7 @@ class list_(Command):
         if what not in topics:
             raise ValueError("%r not in %r" % (what, topics.keys()))
         with self.app.broker_connection() as conn:
-            consumer = self.app.amqp.get_task_consumer(conn)
-            consumer.declare()
+            self.app.amqp.get_task_consumer(conn).declare()
             with conn.channel() as channel:
                 return topics[what](channel)
 list_ = command(list_, "list")