Added connecting status

This commit is contained in:
2026-07-29 18:23:22 +01:00
parent 0d5d110a53
commit 80daaf454d

View File

@@ -154,6 +154,7 @@ def mountDisk(state: AppState) -> None:
["mkdir", "-p", f"/mnt/{state.config.diskSerial}"], ["mkdir", "-p", f"/mnt/{state.config.diskSerial}"],
check=True, check=True,
) )
sleep(0.5)
subprocess.run( subprocess.run(
[ [
"mount", "mount",
@@ -164,6 +165,7 @@ def mountDisk(state: AppState) -> None:
], ],
check=True, check=True,
) )
sleep(0.5)
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
pass pass
else: else:
@@ -179,6 +181,7 @@ def unmountDisk(state: AppState) -> None:
], ],
check=True, check=True,
) )
print("unmounting disk")
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
pass pass
else: else:
@@ -230,6 +233,7 @@ def main() -> None:
and event.event == "connected" and event.event == "connected"
and event.serial == state.config.diskSerial and event.serial == state.config.diskSerial
): ):
state.diskState == "connecting"
mountDisk(state) mountDisk(state)
except Empty: except Empty: