From a7b40811c4a20ef264c054eddbbc2e3f45c6d070 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Sat, 24 Feb 2024 17:01:57 -0600 Subject: [PATCH] handle empty gridftp dirs properly --- iceprod/core/gridftp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/iceprod/core/gridftp.py b/iceprod/core/gridftp.py index 344bbc013..e5b323035 100644 --- a/iceprod/core/gridftp.py +++ b/iceprod/core/gridftp.py @@ -221,6 +221,8 @@ def list(cls, address, request_timeout=None, details=False, dotfiles=False): ret = _cmd_output(cmd, timeout=timeout) if ret[0]: + if (not dotfiles) and 'No match for' in ret[1]: + return [] logger.warning(f'{ret[1]}') raise Exception('Error getting listing') return listify(ret[1], details=details, dotfiles=dotfiles)