Skip to content

Commit d619967

Browse files
authored
fix: Update run_with_catch log flushing (#2806)
Co-authored-by: Neil Ramsay <[email protected]>
1 parent f74c000 commit d619967

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/virtualenv/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def run_with_catch(args=None, env=None):
6565
code = exception.code if isinstance(exception, SystemExit) else 1
6666
sys.exit(code)
6767
finally:
68-
LOGGER.shutdown() # force flush of log messages before the trace is printed
68+
for handler in LOGGER.handlers: # force flush of log messages before the trace is printed
69+
handler.flush()
6970

7071

7172
if __name__ == "__main__": # pragma: no cov

0 commit comments

Comments
 (0)