summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-08-24 13:40:43 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-08-24 13:40:43 +0200
commit8c708ec819333e0360b815bbbb504460e9f15d9a (patch)
tree3c6205e99109b6c509624ca9b9be32689b982edd /apt
parentee7b1ef76f58e8dd3a744af98007c4ab8b5ab6d2 (diff)
downloadpython-apt-8c708ec819333e0360b815bbbb504460e9f15d9a.tar.gz
* apt/cache.py:
- add actiongroup() method (backport from 0.7.92)
Diffstat (limited to 'apt')
-rw-r--r--apt/cache.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/apt/cache.py b/apt/cache.py
index bb396d59..d46cd078 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -335,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} """