File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ async def import_element(id_, context_):
6666 self ._notification_success (id_ , element )
6767 except ApplicationError as error :
6868 self ._notification_failure (id_ , error )
69+ except asyncio .CancelledError :
70+ pass
6971 except Exception :
7072 logger .exception ("Unexpected exception raised in %s importer" , self ._name )
7173 self ._notification_failure (id_ , UnknownError ())
@@ -74,10 +76,12 @@ async def import_elements(ids_, context_):
7476 try :
7577 imports = [import_element (id_ , context_ ) for id_ in ids_ ]
7678 await asyncio .gather (* imports )
77- finally :
7879 self ._notification_finished ()
79- self ._import_in_progress = False
8080 self ._complete ()
81+ except asyncio .CancelledError :
82+ logger .debug ("Importing %s cancelled" , self ._name )
83+ finally :
84+ self ._import_in_progress = False
8185
8286 self ._task_manager .create_task (
8387 import_elements (ids , context ),
You can’t perform that action at this time.
0 commit comments