diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-09 10:58:20 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-09 10:58:20 -0500 |
commit | 67542a990d54284761f45dd3797965ad5c55b930 (patch) | |
tree | 5b54916690f1d94ee159ac04a305bca7b88f7560 /qolab/file_utils | |
parent | b9bb38f5909052680bcc7116b46bec75b2dd742e (diff) | |
download | qolab-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__.py | 2 |
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: |