浏览代码

use % formatter

Edward Betts 9 年之前
父节点
当前提交
8c8b2bd99b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      celery/concurrency/asynpool.py

+ 1 - 1
celery/concurrency/asynpool.py

@@ -1084,7 +1084,7 @@ class AsynPool(_pool.Pool):
         total = sum(vals)
 
         def per(v, total):
-            return '{0:.2f}%'.format((float(v) / total) * 100.0 if v else 0)
+            return '{0:.2%}'.format((float(v) / total) if v else 0)
 
         return {
             'total': total,