Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1577 from golemfactory/FixResourceJoin
Browse files Browse the repository at this point in the history
Check if resource files are empty
  • Loading branch information
badb authored Oct 26, 2017
2 parents 59a44a6 + e865ea9 commit 3190e21
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion golem/resource/hyperdrive/resourcesmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@ def to_wire(self, resources):
def from_wire(self, resources):
iterator = filter(lambda x: isinstance(x, Iterable) and len(x) > 1,
resources)
return list([r[0], [os.path.join(*x) for x in r[1]]] for r in iterator)
results = []

for entry in iterator:
files = [os.path.join(*split) for split in entry[1] if split]
if not files:
logger.debug("Received an empty file list for hash %r",
entry[0])
continue
results.append([entry[0], files])

return results

def add_files(self, files, task_id,
absolute_path=False, client=None, client_options=None):
Expand Down

0 comments on commit 3190e21

Please sign in to comment.