mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-10-01 03:15:44 -04:00
Raise exception when SINGLE destination is created without identity
This commit is contained in:
parent
a91e67129e
commit
d9e6145034
@ -167,6 +167,9 @@ class Destination:
|
||||
identity = RNS.Identity()
|
||||
aspects = aspects+(identity.hexhash,)
|
||||
|
||||
if identity == None and direction == Destination.OUT and self.type != Destination.PLAIN:
|
||||
raise ValueError("Can't create outbound SINGLE destination without an identity")
|
||||
|
||||
if identity != None and self.type == Destination.PLAIN:
|
||||
raise TypeError("Selected destination type PLAIN cannot hold an identity")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user