aboutsummaryrefslogtreecommitdiff
path: root/qolab
diff options
context:
space:
mode:
Diffstat (limited to 'qolab')
-rw-r--r--qolab/file_utils/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/qolab/file_utils/__init__.py b/qolab/file_utils/__init__.py
index 8442d6b..e5ddfb7 100644
--- a/qolab/file_utils/__init__.py
+++ b/qolab/file_utils/__init__.py
@@ -75,7 +75,7 @@ def save_table_with_header(fname, data, header='', comment_symbol='%', skip_head
file_exist_flag = os.path.exists(fname)
item_format=str.join('', ['{', f':{item_format}', '}'])
with open(fname, 'a') as f:
- if not skip_headers_if_file_exist:
+ if not (file_exist_flag and skip_headers_if_file_exist):
for l in header:
f.write(f'{comment_symbol} {l}\n')
if data is not None: