summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-11-04 01:58:18 +0000
committerZac Medico <zmedico@gentoo.org>2006-11-04 01:58:18 +0000
commitdce7a11b1651f279e1fce185451d3ddc2af38068 (patch)
tree5450925512085aa9f2212bc30b653cd815defff9 /pym
parentWhen transferring cache after sync, compare all metadata to make sure it is i... (diff)
downloadportage-multirepo-dce7a11b1651f279e1fce185451d3ddc2af38068.tar.gz
portage-multirepo-dce7a11b1651f279e1fce185451d3ddc2af38068.tar.bz2
portage-multirepo-dce7a11b1651f279e1fce185451d3ddc2af38068.zip
Make sure trg is defined.
svn path=/main/trunk/; revision=4925
Diffstat (limited to 'pym')
-rw-r--r--pym/cache/util.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/cache/util.py b/pym/cache/util.py
index 5dd9970b..2bfaa76f 100644
--- a/pym/cache/util.py
+++ b/pym/cache/util.py
@@ -36,6 +36,7 @@ def mirror_cache(valid_nodes_iterable, src_cache, trg_cache, eclass_cache=None,
del e
continue
write_it = True
+ trg = None
try:
trg = trg_cache[x]
if long(trg["_mtime_"]) == long(entry["_mtime_"]) and eclass_cache.is_eclass_data_valid(trg["_eclasses_"]):
@@ -43,7 +44,7 @@ def mirror_cache(valid_nodes_iterable, src_cache, trg_cache, eclass_cache=None,
except (cache_errors.CacheError, KeyError):
pass
- if not write_it:
+ if trg and not write_it:
""" We don't want to skip the write unless we're really sure that
the existing cache is identical, so don't trust _mtime_ and
_eclasses_ alone."""