summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-21 03:53:16 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-21 03:53:16 +0000
commit1f3ce47900d2c73373dd6032a828d42b115747b0 (patch)
tree21dcd699faa5212334d23f46d792e39b40771931
parent5f207275a5867d19a98dcef4c5f7ca41c3413c5a (diff)
downloadportage-1f3ce47900d2c73373dd6032a828d42b115747b0.tar.gz
portage-1f3ce47900d2c73373dd6032a828d42b115747b0.tar.bz2
portage-1f3ce47900d2c73373dd6032a828d42b115747b0.zip
Make it possible to pass alternative cache implementations into the constructor as suggested by Brian Harring. This patch is from trunk r3547.
svn path=/main/branches/2.1/; revision=3579
-rw-r--r--pym/cache/metadata_overlay.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/cache/metadata_overlay.py b/pym/cache/metadata_overlay.py
index 104dc34d1..b12740bdb 100644
--- a/pym/cache/metadata_overlay.py
+++ b/pym/cache/metadata_overlay.py
@@ -14,7 +14,8 @@ class database(template.database):
autocommits = True
serialize_eclasses = False
- def __init__(self, location, label, auxdbkeys, **config):
+ def __init__(self, location, label, auxdbkeys, db_rw=db_rw, db_ro=db_ro,
+ **config):
super(database, self).__init__(location, label, auxdbkeys)
self.db_rw = db_rw(location, label, auxdbkeys, **config)
self.db_ro = db_ro(label,"metadata/cache",auxdbkeys)