diff --git a/PyInstaller/utils/cliutils/archive_viewer.py b/PyInstaller/utils/cliutils/archive_viewer.py index 687d716fe71..07846e2a36b 100644 --- a/PyInstaller/utils/cliutils/archive_viewer.py +++ b/PyInstaller/utils/cliutils/archive_viewer.py @@ -65,7 +65,6 @@ def main(name, brief, debug, rec_debug, **unused_options): if cmd == 'U': if len(stack) > 1: arch = stack[-1][1] - arch.lib.close() del stack[-1] name, arch = stack[-1] show(name, arch) @@ -106,8 +105,6 @@ def main(name, brief, debug, rec_debug, **unused_options): def do_cleanup(): global stack, cleanup - for (name, arch) in stack: - arch.lib.close() stack = [] for filename in cleanup: try: diff --git a/news/5554.bugfix.rst b/news/5554.bugfix.rst new file mode 100644 index 00000000000..e787e1993c3 --- /dev/null +++ b/news/5554.bugfix.rst @@ -0,0 +1,2 @@ +Fix a crash in ``pyi-archive_viewer`` when quitting the application or +moving up a level.