From e8dd952aa5dd908acfa3af47f918ab2f3e4b7c45 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 15 Jul 2022 10:07:35 -0400 Subject: [PATCH] Fix migration progress output --- netbox/dcim/migrations/0158_populate_cable_terminations.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netbox/dcim/migrations/0158_populate_cable_terminations.py b/netbox/dcim/migrations/0158_populate_cable_terminations.py index 5836d24be..72d7f154a 100644 --- a/netbox/dcim/migrations/0158_populate_cable_terminations.py +++ b/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()