diff options
Diffstat (limited to 'qml/mageiawelcome.py')
-rw-r--r-- | qml/mageiawelcome.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qml/mageiawelcome.py b/qml/mageiawelcome.py index 72be54e..4a38592 100644 --- a/qml/mageiawelcome.py +++ b/qml/mageiawelcome.py @@ -112,6 +112,7 @@ class Launcher(QObject): installed = pyqtSignal() tainted = pyqtSignal() repo = pyqtSignal() + noprogram = pyqtSignal() def __init__(self): QObject.__init__(self) @@ -132,7 +133,7 @@ class Launcher(QObject): try: active = subprocess.run(['urpmq','--list-media','active'], capture_output=True, text=True) active.check_returncode() - except subprocess.CallProcessError: + except subprocess.CalledProcessError: print("Error with urpmq") return for line in active.stdout.splitlines(): @@ -160,7 +161,12 @@ class Launcher(QObject): # Give the signal to reload the applist self.installed.emit() return - proc = subprocess.Popen(cmd) + try: + proc = subprocess.run(cmd) + except: + print(f"Exception running {cmd[0]}" ) + self.noprogram.emit() + return class Norun(QObject): def __init__(self): |