From: Zac Medico Date: Tue, 20 Jun 2006 22:51:00 +0000 (-0000) Subject: Make it easy to pass alternative cache implementations into the constructor as sugges... X-Git-Tag: v2.1.1~453 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7ac080995a21b81c37d6860c3f69c6f24c09fc09;p=portage.git Make it easy to pass alternative cache implementations into the constructor as suggested by Brian Harring. svn path=/main/trunk/; revision=3547 --- 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)