flush progress print from agnos and neos updaters

old-commit-hash: 7c611cd711
commatwo_master
Adeeb Shihadeh 4 years ago
parent 5873c32178
commit 087a332532
  1. 2
      selfdrive/hardware/eon/neos.py
  2. 2
      selfdrive/hardware/tici/agnos.py

@ -34,7 +34,7 @@ def download_file(url: str, fn: str, sha256: str, display_name: str, cloudlog=lo
for chunk in r.iter_content(chunk_size=1024 * 1024):
f.write(chunk)
print(f"Downloading {display_name}: {f.tell() / total * 100}")
print(f"Downloading {display_name}: {f.tell() / total * 100}", flush=True)
except Exception:
cloudlog.error("download error")
if os.path.isfile(fn):

@ -156,7 +156,7 @@ def flash_partition(target_slot_number: int, partition: dict, cloudlog):
p = int(out.tell() / partition['size'] * 100)
if p != last_p:
last_p = p
print(f"Installing {partition['name']}: {p}")
print(f"Installing {partition['name']}: {p}", flush=True)
if raw_hash.hexdigest().lower() != partition['hash_raw'].lower():
raise Exception(f"Raw hash mismatch '{raw_hash.hexdigest().lower()}'")

Loading…
Cancel
Save