aboutsummaryrefslogtreecommitdiff
path: root/qolab/file_utils
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-09 10:58:20 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-09 10:58:20 -0500
commit67542a990d54284761f45dd3797965ad5c55b930 (patch)
tree5b54916690f1d94ee159ac04a305bca7b88f7560 /qolab/file_utils
parentb9bb38f5909052680bcc7116b46bec75b2dd742e (diff)
downloadqolab-67542a990d54284761f45dd3797965ad5c55b930.tar.gz
qolab-67542a990d54284761f45dd3797965ad5c55b930.zip
fixed fron condition for saving headers
Diffstat (limited to 'qolab/file_utils')
-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: