From 82918ee704f41862741066a060a093847b4b1a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 21 Jul 2017 03:10:26 +0200 Subject: [PATCH] api/admin: gracefuly report cancelled backup operation QubesOS/qubes-issues#2931 --- qubes/api/admin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qubes/api/admin.py b/qubes/api/admin.py index c090c730..bc0e4278 100644 --- a/qubes/api/admin.py +++ b/qubes/api/admin.py @@ -1209,6 +1209,8 @@ class QubesAdminAPI(qubes.api.AbstractQubesAPI): self.app.api_admin_running_backups[self.arg] = backup_task try: yield from backup_task + except asyncio.CancelledError: + raise qubes.exc.QubesException('Backup cancelled') finally: del self.app.api_admin_running_backups[self.arg]