handling writers for when we dont need outputs (no --all for example)

This commit is contained in:
Ozbolt Menegatti 2019-06-09 13:36:07 +02:00
parent 5929004c44
commit 89f35f5259

View File

@ -1186,6 +1186,9 @@ class Writer:
file_handler.flush() file_handler.flush()
def write_out(self, structures, colocation_ids): def write_out(self, structures, colocation_ids):
if self.output_file is None:
return
def fp_close(fp_): def fp_close(fp_):
if fp_ != sys.stdout: if fp_ != sys.stdout:
fp_.close() fp_.close()