From f2cedf7e195883e09ef4e3cc10f66cc5e15ce134 Mon Sep 17 00:00:00 2001 From: Rudd-O Date: Tue, 14 Jul 2020 18:30:03 +0000 Subject: [PATCH] Another fix. --- connection_plugins/qubes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connection_plugins/qubes.py b/connection_plugins/qubes.py index 7df4fd9..c281b52 100644 --- a/connection_plugins/qubes.py +++ b/connection_plugins/qubes.py @@ -171,7 +171,6 @@ def fetch(in_path, bufsize): except (IOError, OSError) as e: sys.stdout.write(b'N\n') encode_exception(e, sys.stdout) - f.close() return sys.stdout.write('{}\n'.format(len(data)).encode('ascii')) if len(data) == 0: @@ -179,7 +178,8 @@ def fetch(in_path, bufsize): break sys.stdout.write(data) sys.stdout.flush() - f.close() + finally: + f.close() if __name__ == '__main__':