From 015bb4fa79d01a1e2d4887cba96d150c7e1dd3bb Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Wed, 12 Jun 2024 21:59:50 -0400 Subject: [Enterprise] Clean up initialization flow --- python/collaboration/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'python/collaboration/__init__.py') 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: -- cgit v1.3.1