mirror of
https://github.com/aljazceru/nutshell.git
synced 2026-01-05 09:54:21 +01:00
CLI: error handling invalid nostr client key (#144)
* improve error handling, catch and handle exception around nostr client creation * add makefile * apply formatting as per PR feedback --------- Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
This commit is contained in:
@@ -643,9 +643,12 @@ async def info(ctx: Context):
|
||||
if settings.tor:
|
||||
print(f"Tor enabled: {settings.tor}")
|
||||
if settings.nostr_private_key:
|
||||
client = NostrClient(private_key=settings.nostr_private_key, connect=False)
|
||||
print(f"Nostr public key: {client.public_key.bech32()}")
|
||||
print(f"Nostr relays: {settings.nostr_relays}")
|
||||
try:
|
||||
client = NostrClient(private_key=settings.nostr_private_key, connect=False)
|
||||
print(f"Nostr public key: {client.public_key.bech32()}")
|
||||
print(f"Nostr relays: {settings.nostr_relays}")
|
||||
except:
|
||||
print(f"Nostr: Error. Invalid key.")
|
||||
if settings.socks_host:
|
||||
print(f"Socks proxy: {settings.socks_host}:{settings.socks_port}")
|
||||
print(f"Mint URL: {ctx.obj['HOST']}")
|
||||
|
||||
Reference in New Issue
Block a user