Переглянути джерело

Catch possible KeyError when starting dispVM

donoban 5 роки тому
батько
коміт
287fc441f3
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      qubesmanager/common_threads.py

+ 2 - 2
qubesmanager/common_threads.py

@@ -34,8 +34,8 @@ class RemoveVMThread(QtCore.QThread):
     def run(self):
         try:
             del self.vm.app.domains[self.vm.name]
-        except exc.QubesException as ex:
-            self.msg = ("Error removing Qube!", str(ex))
+        except (exc.QubesException, KeyError) as ex:
+            self.msg = ("Error removing qube!", str(ex))
 
 
 # pylint: disable=too-few-public-methods