manager: ignore FileNotFoundError during user import run (#86086) #252

Open
bdauvergne wants to merge 1 commits from wip/86086-FileNotFoundError-en-cherchant-a into main
1 changed files with 5 additions and 1 deletions

View File

@ -214,7 +214,7 @@ class Report:
with self.data_update as data:
data['progress'] = '%s, %d%%' % (status, round((line / total) * 100))
def thread_worker():
def _run():
from authentic2.csv_import import UserCsvImporter
with self.user_import.import_file as fd:
@ -256,6 +256,10 @@ class Report:
data['importer'] = importer
data['duration'] = duration
def thread_worker():
with contextlib.suppress(FileNotFoundError):
_run()
t = threading.Thread(target=thread_worker)
t.daemon = True
if start: