From 5c93d454616d53a95c980084f6689b5d2dc47adc Mon Sep 17 00:00:00 2001 From: Sebastien Guillot Date: Thu, 25 Aug 2022 15:10:09 +0200 Subject: [PATCH] Update psrpipe.py Bugfix in the log when multiple MKF, ATT or ORB files are found --- scripts/psrpipe.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/psrpipe.py b/scripts/psrpipe.py index 4da0942..730db76 100755 --- a/scripts/psrpipe.py +++ b/scripts/psrpipe.py @@ -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))) @@ -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))) @@ -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)))