summaryrefslogtreecommitdiff
path: root/python/collaboration/__init__.py
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2024-06-12 21:59:50 -0400
committerAlexander Taylor <alex@vector35.com>2024-06-26 09:47:42 -0400
commit015bb4fa79d01a1e2d4887cba96d150c7e1dd3bb (patch)
tree8333733fca03ec373b63d7390096db986e0b8a3f /python/collaboration/__init__.py
parent17435e0df2dccb8f09ec26e54de017ee05ade8ee (diff)
[Enterprise] Clean up initialization flow
Diffstat (limited to 'python/collaboration/__init__.py')
-rw-r--r--python/collaboration/__init__.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/python/collaboration/__init__.py b/python/collaboration/__init__.py
index 63331d83..dd20eebb 100644
--- a/python/collaboration/__init__.py
+++ b/python/collaboration/__init__.py
@@ -75,14 +75,15 @@ def enterprise_remote() -> Optional['Remote']:
return None
-def add_known_remote(remote: 'Remote') -> None:
+def create_remote(name: str, address: str) -> 'Remote':
"""
- Add a Remote to the list of known remotes (saved to Settings)
+ Create a Remote and add it to the list of known remotes (saved to Settings)
- :param remote: New Remote to add
+ :param name: Identifier for remote
+ :param address: Base address (HTTPS) for all api requests
"""
binaryninja._init_plugins()
- core.BNCollaborationAddRemote(remote._handle)
+ return Remote(core.BNCollaborationCreateRemote(name, address))
def remove_known_remote(remote: 'Remote') -> None: