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()