Browse Source

use % formatter

Edward Betts 9 năm trước cách đây
mục cha
commit
8c8b2bd99b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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,