提交 3fcae115 authored 作者: Frederic Bastien's avatar Frederic Bastien

Add a ProxyDB to work around the limitation that we can't register an object multiple time in a DB.

上级 9a08990a
...@@ -229,3 +229,15 @@ class SequenceDB(DB): ...@@ -229,3 +229,15 @@ class SequenceDB(DB):
return sio.getvalue() return sio.getvalue()
class ProxyDB(DB):
"""
This is needed as we can't register the same DB mutiple time in different position
in a SequentialDB
"""
def __init__(self, db):
assert isinstance(db, DB), ""
self.db = db
def query(self, *tags, **kwtags):
return self.db.query(*tags, **kwtags)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论