manager: ignore FileNotFoundError during user import run (#86086)
gitea/authentic/pipeline/head This commit looks good
Details
gitea/authentic/pipeline/head This commit looks good
Details
This commit is contained in:
parent
d50622cb81
commit
4a7cf5c296
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue