fix: clearer error reporting

This commit is contained in:
2026-08-21 17:15:58 +08:00
parent 83a3d9a10c
commit 123df61930
+2 -2
View File
@@ -281,9 +281,10 @@ def main(driver: WebDriver, logger = logging.getLogger('main')):
name = options.pop('profile')
profile = next(filter(lambda o: o.name == name, profiles))
except (IndexError, KeyError):
logger.error('Operation failed:\n\n%s' % ', '.join(errors)) if errors else None
errors.clear()
logger.info('Done')
status = Status.READY
if errors: logger.error('Operation failed at:\n\n%s' % ', '.join(errors))
continue
except StopIteration:
logger.error("Invalid profile '%s'", name)
@@ -294,7 +295,6 @@ def main(driver: WebDriver, logger = logging.getLogger('main')):
status = Status.STANDBY
continue
errors.clear()
progress.clear()
progress['task'] = 'Task 1 of 4'
t2.clear()