Skip to content

Commit

Permalink
Update psrpipe.py
Browse files Browse the repository at this point in the history
Bugfix in the log when multiple MKF, ATT or ORB files are found
  • Loading branch information
sguillot committed Aug 25, 2022
1 parent 9373023 commit 5c93d45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/psrpipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def runcmd(cmd):

# Get filter file
mkfile = glob(path.join(obsdir, "auxil/ni*.mkf*"))[0]
if len(glob(path.join(obsdir, "auxil/ni*.mkf*"))):
if len(glob(path.join(obsdir, "auxil/ni*.mkf*")))>1:
log.info("Multiple MKF files found :")
for f in glob(path.join(obsdir, "auxil/ni*.mkf*")):
log.info(" -> {}".format(path.basename(f)))
Expand Down Expand Up @@ -375,7 +375,7 @@ def runcmd(cmd):

# Get orbit file
orbfile = glob(path.join(obsdir, "auxil/ni*.orb*"))[0]
if len(glob(path.join(obsdir, "auxil/ni*.orb*"))):
if len(glob(path.join(obsdir, "auxil/ni*.orb*")))>1:
log.info("Multiple orbit files found :")
for f in glob(path.join(obsdir, "auxil/ni*.orb*")):
log.info(" -> {}".format(path.basename(f)))
Expand All @@ -385,7 +385,7 @@ def runcmd(cmd):

# Get ATT hk files
attfile = glob(path.join(obsdir, "auxil/ni*.att*"))[0]
if len(glob(path.join(obsdir, "auxil/ni*.att*"))):
if len(glob(path.join(obsdir, "auxil/ni*.att*")))>1:
log.info("Multiple ATT HK files found :")
for f in glob(path.join(obsdir, "auxil/ni*.att*")):
log.info(" -> {}".format(path.basename(f)))
Expand Down

0 comments on commit 5c93d45

Please sign in to comment.