Skip to content

Commit 1c78cab

Browse files
committed
bugfix in averages.py
In case a _BIS file was renamed, the tag was not fixed in the log file. This is more reliable to rather guess the tag from the filename
1 parent dae6baa commit 1c78cab

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

python/magic/averages.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,10 @@ def get_tags(self, datadir, tstart):
389389
nml = MagicSetup(nml=lg, quiet=True)
390390
if hasattr(nml, 'start_time'):
391391
if nml.start_time > tstart:
392-
tags.append(nml.tag)
392+
tag = lg.split('log.')[-1] # This is safer than nml.tag
393+
# in case the file has been renamed
394+
# because of BIS files
395+
tags.append(tag)
393396

394397
return tags
395398

0 commit comments

Comments
 (0)