mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-04 07:34:51 -04:00
Handle missing identity file in rncp. Fixes #317.
This commit is contained in:
parent
45295c779c
commit
a8a7af4b74
2 changed files with 7 additions and 2 deletions
|
@ -226,7 +226,12 @@ def send(configdir, verbosity = 0, quietness = 0, destination = None, file = Non
|
|||
|
||||
identity_path = RNS.Reticulum.identitypath+"/"+APP_NAME
|
||||
if os.path.isfile(identity_path):
|
||||
identity = RNS.Identity.from_file(identity_path)
|
||||
identity = RNS.Identity.from_file(identity_path)
|
||||
if identity == None:
|
||||
RNS.log("Could not load identity for rncp. The identity file at \""+str(identity_path)+"\" may be corrupt or unreadable.", RNS.LOG_ERROR)
|
||||
exit(2)
|
||||
else:
|
||||
identity = None
|
||||
|
||||
if identity == None:
|
||||
RNS.log("No valid saved identity found, creating new...", RNS.LOG_INFO)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue