From 0ca5e871291fe7db7354e78502f3b6c6df91bcdb Mon Sep 17 00:00:00 2001 From: Rusty Bird Date: Thu, 11 Feb 2021 11:17:43 +0000 Subject: [PATCH] Fix pylint invalid-overridden-method warning "Method 'start' was expected to be 'async', found it instead as 'non-async'" QubesOS/qubes-issues#2738 --- qubes/vm/dispvm.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qubes/vm/dispvm.py b/qubes/vm/dispvm.py index 05d85d60..665a6adc 100644 --- a/qubes/vm/dispvm.py +++ b/qubes/vm/dispvm.py @@ -233,8 +233,7 @@ class DispVM(qubes.vm.qubesvm.QubesVM): yield from self.remove_from_disk() self.app.save() - @asyncio.coroutine - def start(self, **kwargs): + async def start(self, **kwargs): # pylint: disable=arguments-differ try: @@ -244,10 +243,10 @@ class DispVM(qubes.vm.qubesvm.QubesVM): 'template for DispVM ({}) needs to have ' 'template_for_dispvms=True'.format(self.template.name)) - yield from super().start(**kwargs) + await super().start(**kwargs) except: # Cleanup also on failed startup - yield from self._auto_cleanup() + await self._auto_cleanup() raise def create_qdb_entries(self):