diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-06-14 15:46:16 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-06-14 15:46:16 +0000 |
commit | 8762b87aad701e2f038bf2a0fc5016fd6a632c64 (patch) | |
tree | 0b72ff3164178c6b8e7b6c151f0112630c968c0c /morphlib/builder2.py | |
parent | bfad258d85d25c4eb5b3232d464ab6634492b17d (diff) | |
download | morph-8762b87aad701e2f038bf2a0fc5016fd6a632c64.tar.gz |
morphlib.builder2: check in local cache first
It's possible to work without a remote artifact cache, sadly there
is not an explicit check for a None remote artifact cache to prevent
it downloading dependencies.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r-- | morphlib/builder2.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py index 4622467d..e0e1ca57 100644 --- a/morphlib/builder2.py +++ b/morphlib/builder2.py @@ -71,8 +71,8 @@ def download_depends(constituents, lac, rac, metadatas=None): source.close() if metadatas is not None: for metadata in metadatas: - if (rac.has_artifact_metadata(constituent, metadata) and - not lac.has_artifact_metadata(constituent, metadata)): + if (not lac.has_artifact_metadata(constituent, metadata) + and rac.has_artifact_metadata(constituent, metadata)): src = rac.get_artifact_metadata(constituent, metadata) dst = lac.put_artifact_metadata(constituent, metadata) shutil.copyfileobj(src, dst) |