From a705b482f1a97b17dca71b64f2e571c6db29f337 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Wed, 20 Nov 2019 09:24:16 -0600 Subject: fix small bug in cat-grid-jobs This commit fixes a small bug in cat-grid-jobs which was causing it to print the wrong filename when there was no git_sha1 attrs in the HDF5 file. --- utils/cat-grid-jobs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/cat-grid-jobs') diff --git a/utils/cat-grid-jobs b/utils/cat-grid-jobs index 218c1b7..3873cd3 100755 --- a/utils/cat-grid-jobs +++ b/utils/cat-grid-jobs @@ -172,13 +172,13 @@ if __name__ == '__main__': with h5py.File(args.output,"a") as fout: total_events = fout['ev'].shape[0] for filename in glob.glob(join(args.directory,'*.hdf5')): + head, tail = split(filename) with h5py.File(filename) as f: if 'git_sha1' not in f.attrs: print_fail("No git sha1 found for %s. Skipping..." % tail) continue # Check to see if the git sha1 match if fout.attrs['git_sha1'] != f.attrs['git_sha1']: - head, tail = split(filename) print_warning_once("git_sha1 is %s for current version but %s for %s" % (fout.attrs['git_sha1'],f.attrs['git_sha1'],tail)) # get fits which match up with the events valid_fits = f['fits'][np.isin(f['fits'][:][['run','gtid']],fout['ev'][:][['run','gtid']])] -- cgit