From 75d5c0359a29152886d453287fbda8f6dc78d793 Mon Sep 17 00:00:00 2001 From: Peter Moore Date: Thu, 9 Jun 2016 17:12:02 +0200 Subject: [PATCH] Bug 1278999 - handle generic worker style artifacts (list not dictionary). r=wcosta --HG-- extra : rebase_source : 975894206800aa9261f0683ffcd9948f0da4d408 --- taskcluster/taskgraph/kind/legacy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/taskcluster/taskgraph/kind/legacy.py b/taskcluster/taskgraph/kind/legacy.py index 87e9c884fa16..a209f8040bc3 100644 --- a/taskcluster/taskgraph/kind/legacy.py +++ b/taskcluster/taskgraph/kind/legacy.py @@ -204,7 +204,10 @@ def set_expiration(task, timestamp): except KeyError: return - for artifact in artifacts.values(): + # for docker-worker, artifacts is a dictionary + # for generic-worker, artifacts is a list + # for taskcluster-worker, it will depend on what we do in artifacts plugin + for artifact in artifacts.values() if hasattr(artifacts, "values") else artifacts: artifact['expires'] = timestamp def add_treeherder_revision_info(task, revision, revision_hash):