mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-22 13:40:19 +00: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()
|
identity = RNS.Identity()
|
||||||
aspects = aspects+(identity.hexhash,)
|
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:
|
if identity != None and self.type == Destination.PLAIN:
|
||||||
raise TypeError("Selected destination type PLAIN cannot hold an identity")
|
raise TypeError("Selected destination type PLAIN cannot hold an identity")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user