Skip to content

Commit

Permalink
Issue #2574: fix for transfer parameters script
Browse files Browse the repository at this point in the history
  • Loading branch information
ekazachkova committed Jul 31, 2024
1 parent 1703992 commit 0dffa35
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions workflows/pipe-common/pipeline/storage/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def pipe_ls(self, target, max_attempts, recursive=False, all=False, show_info=Fa
result = []
if not listing or 'Name' not in listing[0]:
raise ValueError('File {} not found while listing storage'.format(target))
file_path_start = listing[0].index('Name')
for path in listing[1:]:
fields = path.strip().split()
if not fields:
Expand All @@ -89,7 +88,10 @@ def pipe_ls(self, target, max_attempts, recursive=False, all=False, show_info=Fa
size = None
if line_type == 'File':
size = fields[4]
item_path = path[file_path_start:].strip()
file_path_start = 5
else:
file_path_start = 1
item_path = ' '.join(fields[file_path_start:]).strip()
result.append((line_type, item_path, size))
return result

Expand Down

0 comments on commit 0dffa35

Please sign in to comment.