From 89f35f5259b2f1ed6c354208b9504e4514f95820 Mon Sep 17 00:00:00 2001 From: Ozbolt Menegatti Date: Sun, 9 Jun 2019 13:36:07 +0200 Subject: [PATCH] handling writers for when we dont need outputs (no --all for example) --- wani.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wani.py b/wani.py index 7d10c1d..64ce126 100644 --- a/wani.py +++ b/wani.py @@ -1186,6 +1186,9 @@ class Writer: file_handler.flush() def write_out(self, structures, colocation_ids): + if self.output_file is None: + return + def fp_close(fp_): if fp_ != sys.stdout: fp_.close()