소스 검색

Fix migration progress output

jeremystretch 3 년 전
부모
커밋
e8dd952aa5
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      netbox/dcim/migrations/0158_populate_cable_terminations.py

+ 2 - 0
netbox/dcim/migrations/0158_populate_cable_terminations.py

@@ -64,6 +64,8 @@ def populate_cable_terminations(apps, schema_editor):
         # Output progress occasionally
         if 'test' not in sys.argv and not i % 100:
             progress = float(i) * 100 / cable_count
+            if i == 100:
+                print('')
             sys.stdout.write(f"\r    Updated {i}/{cable_count} cables ({progress:.2f}%)")
             sys.stdout.flush()