diff --git a/files/scripts/updates-uptime-cmd.py b/files/scripts/updates-uptime-cmd.py index 91b928e4e1..fc87ea72a7 100755 --- a/files/scripts/updates-uptime-cmd.py +++ b/files/scripts/updates-uptime-cmd.py @@ -1097,13 +1097,13 @@ def _cmd_remove_old_hosts(args): remove_old_hosts() def _cmd_update(args): + cmd = args.cmd # First remove machines that aren't in inventory anymore, as the playbook # only adds/updates them. if cmd != "update-daily-refresh": # Just wastes time if refresh. remove_old_hosts() # Now update whatever is left. - cmd = args.cmd if cmd == "update": cmd = "update-flush" if not os.path.exists(fname):