From a78fb4a3ab4d957aad622eea7da0e1e4e63f4bdc Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 2 Jul 2024 22:40:05 +0000 Subject: [PATCH] fix checks --- petric.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/petric.py b/petric.py index 28aa468..61e12f4 100755 --- a/petric.py +++ b/petric.py @@ -182,8 +182,11 @@ def get_data(srcdir=".", outdir=OUTDIR, sirf_verbosity=0): if __name__ != "__main__": srcdir, outdir, metrics = data_dirs_metrics[0] - data = get_data(srcdir=srcdir, outdir=outdir) - metrics[0].reset() + if srcdir is None: + data = None + else: + data = get_data(srcdir=srcdir, outdir=outdir) + metrics[0].reset() else: from docopt import docopt args = docopt(__doc__)