@@ -96,8 +96,9 @@ def store_async(self, reader):
9696class PureRootPathDB (RootPathDB ):
9797
9898 def __init__ (self , root_path ):
99- super (PureRootPathDB , self ).__init__ (root_path )
10099 self ._root_path = root_path
100+ super (PureRootPathDB , self ).__init__ (root_path )
101+
101102
102103
103104 #{ Interface
@@ -127,8 +128,8 @@ class PureCompoundDB(CompoundDB, PureObjectDBR, LazyMixin, CachingDB):
127128 def _set_cache_ (self , attr ):
128129 if attr == '_dbs' :
129130 self ._dbs = list ()
130- elif attr == '_db_cache ' :
131- self ._db_cache = dict ()
131+ elif attr == '_obj_cache ' :
132+ self ._obj_cache = dict ()
132133 else :
133134 super (PureCompoundDB , self )._set_cache_ (attr )
134135
@@ -138,14 +139,14 @@ def _db_query(self, sha):
138139 # most databases use binary representations, prevent converting
139140 # it everytime a database is being queried
140141 try :
141- return self ._db_cache [sha ]
142+ return self ._obj_cache [sha ]
142143 except KeyError :
143144 pass
144145 # END first level cache
145146
146147 for db in self ._dbs :
147148 if db .has_object (sha ):
148- self ._db_cache [sha ] = db
149+ self ._obj_cache [sha ] = db
149150 return db
150151 # END for each database
151152 raise BadObject (sha )
@@ -181,7 +182,7 @@ def databases(self):
181182
182183 def update_cache (self , force = False ):
183184 # something might have changed, clear everything
184- self ._db_cache .clear ()
185+ self ._obj_cache .clear ()
185186 stat = False
186187 for db in self ._dbs :
187188 if isinstance (db , CachingDB ):
@@ -191,8 +192,6 @@ def update_cache(self, force=False):
191192 return stat
192193
193194 def partial_to_complete_sha_hex (self , partial_hexsha ):
194- databases = self .databases ()
195-
196195 len_partial_hexsha = len (partial_hexsha )
197196 if len_partial_hexsha % 2 != 0 :
198197 partial_binsha = hex_to_bin (partial_hexsha + "0" )
0 commit comments