mirror of
https://github.com/markqvist/Reticulum
synced 2026-11-22 23:10:32 +00:00
Abort early on non-enabled link mode
This commit is contained in:
1 file changed
+1
@@ -239,6 +239,7 @@ class Link:
|
||||
|
||||
def __init__(self, destination=None, established_callback=None, closed_callback=None, owner=None, peer_pub_bytes=None, peer_sig_pub_bytes=None, mode=MODE_DEFAULT):
|
||||
if destination != None and destination.type != RNS.Destination.SINGLE: raise TypeError("Links can only be established to the \"single\" destination type")
|
||||
if not mode in Link.ENABLED_MODES: raise TypeError(f"Requested link mode {Link.MODE_DESCRIPTIONS[mode]} not enabled")
|
||||
self.mode = mode
|
||||
self.link_id = None
|
||||
self.rtt = None
|
||||
|
||||
Reference in new issue
Block a user