From 930672acb6786dbcc1795ebbf5d138e6fe641f2f Mon Sep 17 00:00:00 2001 From: ducoterra Date: Wed, 11 Sep 2019 21:57:56 -0400 Subject: [PATCH] add comments --- flash.py | 8 ++++++++ 1 file changed, 8 insertions(+) mode change 100755 => 100644 flash.py diff --git a/flash.py b/flash.py old mode 100755 new mode 100644 index da360a0..c6a280d --- a/flash.py +++ b/flash.py @@ -44,17 +44,25 @@ def flash(dev): try: flash_cmd = ["/bin/dd", f"if={IMAGE}", f"of={dev}"] + print("flashing") subprocess.run(flash_cmd) + print("flashed") with tempfile.TemporaryDirectory() as tempdir: mount_cmd = ["mount",f"{dev}2", tempdir] umount_cmd = ["umount", tempdir] + print("mounting") subprocess.run(mount_cmd) + print(f"changing dir to {tempdir}") os.chdir(tempdir) + print("making ssh dir") os.mkdir("ssh") + print(f"changing dir to {PWD}") os.chdir(PWD) + print(f"copying wpa_supplicant to {tempdir}") copyfile("wpa_supplicant.conf", tempdir) + print("unmounting") subprocess.run(umount_cmd) return True