summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-08-24 16:45:03 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-08-24 16:45:03 +0200
commitecbf6e3a8002a1173a05decdf57f5b197482f8d2 (patch)
tree47f13f24a2401c305bcfc4173e406dc1ed91ac18 /apt
parenteb48d80c9a845bbb687790331c0a7c71a3365973 (diff)
parentefad08768bc116c15de5f92387e1fd88c0734fd0 (diff)
downloadpython-apt-ecbf6e3a8002a1173a05decdf57f5b197482f8d2.tar.gz
merge the mvo branch
Diffstat (limited to 'apt')
-rw-r--r--apt/cache.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 756f9ba9..828b167b 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -135,6 +135,7 @@ class Cache(object):
return self._weakref[key]
except KeyError:
if key in self._set:
+ key = str(key)
pkg = self._weakref[key] = Package(self, self._cache[key])
return pkg
else:
@@ -334,6 +335,15 @@ class Cache(object):
a signal then """
self._runCallbacks("cache_pre_change")
+ def actiongroup(self):
+ """Return an ActionGroup() object for the current cache.
+
+ Action groups can be used to speedup actions. The action group is
+ active as soon as it is created, and disabled when the object is
+ deleted or when release() is called.
+ """
+ return apt_pkg.GetPkgActionGroup(self._depcache)
+
def connect(self, name, callback):
""" connect to a signal, currently only used for
cache_{post,pre}_{changed,open} """