diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-06-20 22:51:00 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-06-20 22:51:00 +0000 |
commit | 7ac080995a21b81c37d6860c3f69c6f24c09fc09 (patch) | |
tree | 17440478a90b418d31d2a854c84ca820276bf5dc | |
parent | 11c03b891526e89f5884f966df6e8456b9af9145 (diff) | |
download | portage-7ac080995a21b81c37d6860c3f69c6f24c09fc09.tar.gz portage-7ac080995a21b81c37d6860c3f69c6f24c09fc09.tar.bz2 portage-7ac080995a21b81c37d6860c3f69c6f24c09fc09.zip |
Make it easy to pass alternative cache implementations into the constructor as suggested by Brian Harring.
svn path=/main/trunk/; revision=3547
-rw-r--r-- | pym/cache/metadata_overlay.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/cache/metadata_overlay.py b/pym/cache/metadata_overlay.py index 821beead1..287e05521 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) |