Skip to content

Commit

Permalink
handle empty gridftp dirs properly
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult committed Feb 24, 2024
1 parent 75abfed commit a7b4081
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions iceprod/core/gridftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a7b4081

Please sign in to comment.