Added connecting status
This commit is contained in:
4
main.py
4
main.py
@@ -154,6 +154,7 @@ def mountDisk(state: AppState) -> None:
|
||||
["mkdir", "-p", f"/mnt/{state.config.diskSerial}"],
|
||||
check=True,
|
||||
)
|
||||
sleep(0.5)
|
||||
subprocess.run(
|
||||
[
|
||||
"mount",
|
||||
@@ -164,6 +165,7 @@ def mountDisk(state: AppState) -> None:
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
sleep(0.5)
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
else:
|
||||
@@ -179,6 +181,7 @@ def unmountDisk(state: AppState) -> None:
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
print("unmounting disk")
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
else:
|
||||
@@ -230,6 +233,7 @@ def main() -> None:
|
||||
and event.event == "connected"
|
||||
and event.serial == state.config.diskSerial
|
||||
):
|
||||
state.diskState == "connecting"
|
||||
mountDisk(state)
|
||||
|
||||
except Empty:
|
||||
|
||||
Reference in New Issue
Block a user