summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-10-15 11:27:49 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-10-15 11:27:49 +0200
commit3a7246ab8faa36eb270f28e6b47e1608e587365a (patch)
tree35bbeb9ad525116db36309887a6b99d624ea0329 /apt
parent7a7722a91bd80572daf5d5f7f377b7b189e533bf (diff)
downloadpython-apt-3a7246ab8faa36eb270f28e6b47e1608e587365a.tar.gz
close cache on (re)open
Diffstat (limited to 'apt')
-rw-r--r--apt/cache.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/apt/cache.py b/apt/cache.py
index adc936ef..beebde8a 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -142,6 +142,8 @@ class Cache(object):
"""
if progress is None:
progress = apt.progress.base.OpProgress()
+ # close old cache on (re)open
+ self.close()
self.op_progress = progress
self._run_callbacks("cache_pre_open")