소스 검색

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