summaryrefslogtreecommitdiff
path: root/apt/cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'apt/cache.py')
-rw-r--r--apt/cache.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 690510e3..9e682bd8 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -33,11 +33,10 @@ class Cache(object):
def __init__(self, progress=None, rootdir=None):
self._callbacks = {}
- self.open(progress)
-
if rootdir:
apt_pkg.Config.Set("Dir", rootdir)
apt_pkg.Config.Set("Dir::State::status", rootdir + "/var/lib/dpkg/status")
+ self.open(progress)
def _runCallbacks(self, name):
""" internal helper to run a callback """