Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9341696
D5428.id19401.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
832 B
Subscribers
None
D5428.id19401.diff
View Options
diff --git a/swh/core/api/__init__.py b/swh/core/api/__init__.py
--- a/swh/core/api/__init__.py
+++ b/swh/core/api/__init__.py
@@ -432,12 +432,14 @@
def __init__(self, *args, backend_class=None, backend_factory=None, **kwargs):
super().__init__(*args, **kwargs)
+ self.add_backend_class(backend_class, backend_factory)
+
+ def add_backend_class(self, backend_class=None, backend_factory=None):
if backend_class is None and backend_factory is not None:
raise ValueError(
"backend_factory should only be provided if backend_class is"
)
- self.backend_class = backend_class
if backend_class is not None:
backend_factory = backend_factory or backend_class
for (meth_name, meth) in backend_class.__dict__.items():
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 12:16 PM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216824
Attached To
D5428: Allow to use several backends with a RPCServerApp
Event Timeline
Log In to Comment