summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richardipsum@fastmail.co.uk>2014-10-10 20:03:17 +0100
committerRichard Ipsum <richardipsum@fastmail.co.uk>2014-10-10 21:27:28 +0100
commit639bca2a58e872238e991311676f448065093ea2 (patch)
tree245b134c42f277f3843856e0cf17710a7b49e13f
parent97f5b7fdfc7cb89748ce477653aae5c54c16668b (diff)
downloadmorph-639bca2a58e872238e991311676f448065093ea2.tar.gz
Simplify _resolve_system_artifacts
-rw-r--r--morphlib/artifactresolver.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/morphlib/artifactresolver.py b/morphlib/artifactresolver.py
index 30fb5e5a..e53c7511 100644
--- a/morphlib/artifactresolver.py
+++ b/morphlib/artifactresolver.py
@@ -57,19 +57,11 @@ class ArtifactResolver(object):
if not a.dependents]
def _resolve_system_artifacts(self, source, artifacts): # pragma: no cover
- systems = [source.artifacts[name]
- for name in source.split_rules.artifacts]
+ systems = [source.artifacts[name] for name
+ in source.split_rules.artifacts]
- for system in (s for s in systems if s not in self._added_artifacts):
- artifacts.append(system)
- self._added_artifacts.add(system)
-
- resolved_artifacts = self._resolve_system_dependencies(systems, source)
-
- for artifact in resolved_artifacts:
- if not artifact in self._added_artifacts:
- artifacts.append(artifact)
- self._added_artifacts.add(artifact)
+ artifacts += systems
+ artifacts += self._resolve_system_dependencies(systems, source)
def _resolve_stratum_artifacts(self, source, artifacts):
# Iterate split_rules.artifacts, rather than