From 90620ffdf45201a665cee43b2c10a3945b252f98 Mon Sep 17 00:00:00 2001 From: Daniel Schulte <daniel@schultes-home.de> Date: Fri, 16 Oct 2015 22:28:20 +0200 Subject: [PATCH] linuxparty.py: Fixed not trying to mount the stick if it is not mounted --- scripts/linuxparty.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/linuxparty.py b/scripts/linuxparty.py index b92f62e..4d8bfe9 100755 --- a/scripts/linuxparty.py +++ b/scripts/linuxparty.py @@ -57,7 +57,11 @@ def enable_offline_repo(gui): stick = None while True: stick = find_lipstick() - print(stick) + if stick is not None: + if len(stick[2])<1: + mount_stick(stick[1]) + stick = find_lipstick() + if stick is None or (type(stick) is tuple and len(stick[2])<=0): choice = QtWidgets.QMessageBox.question(gui, 'LIPStick nicht gefunden!', "Möchtest du noch einmal versuchen den LIPStick zu finden?", QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No) if choice == QtWidgets.QMessageBox.No: @@ -68,7 +72,7 @@ def enable_offline_repo(gui): break if stick is None: - QtWidgets.QMessageBox.error(gui, "Kein LIPSTick gefunden", "Es wird ohne LIPStick weiter gemacht") + QtWidgets.QMessageBox.critical(gui, "Kein LIPStick gefunden", "Es wird ohne LIPStick weiter gemacht") return subprocess_wrap(['/bin/bash', basedir+"/liprepoctl.sh", "on", stick[2][0]]) -- GitLab