소스 검색

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,