Skip to content

Commit

Permalink
Merge e19df6c into 441e28b
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidalgarcia committed Oct 10, 2019
2 parents 441e28b + e19df6c commit 5cbd010
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions reana_workflow_controller/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,14 @@ def list_directory_files(directory):
fs_ = fs.open_fs(directory)
file_list = []
for file_name in fs_.walk.files():
file_details = fs_.getinfo(file_name, namespaces=['details'])
file_list.append({'name': file_name.lstrip('/'),
'last-modified': file_details.modified.
strftime(WORKFLOW_TIME_FORMAT),
'size': file_details.size})
try:
file_details = fs_.getinfo(file_name, namespaces=['details'])
file_list.append({'name': file_name.lstrip('/'),
'last-modified': file_details.modified
.strftime(WORKFLOW_TIME_FORMAT),
'size': file_details.size})
except fs.errors.ResourceNotFound:
continue
return file_list


Expand Down

0 comments on commit 5cbd010

Please sign in to comment.