docs: fix python path typo
`os.path.expanduser` is needed to evaluate paths relative to the user's home directory.
This commit is contained in:
parent
eb98d7d215
commit
3f2f74bae7
@ -54,7 +54,7 @@ import grpc
|
|||||||
|
|
||||||
# Lnd cert is at ~/.lnd/tls.cert on Linux and
|
# Lnd cert is at ~/.lnd/tls.cert on Linux and
|
||||||
# ~/Library/Application Support/Lnd/tls.cert on Mac
|
# ~/Library/Application Support/Lnd/tls.cert on Mac
|
||||||
cert = open('~/.lnd/tls.cert').read()
|
cert = open(os.path.expanduser('~/.lnd/tls.cert')).read()
|
||||||
creds = grpc.ssl_channel_credentials(cert)
|
creds = grpc.ssl_channel_credentials(cert)
|
||||||
channel = grpc.secure_channel('localhost:10009', creds)
|
channel = grpc.secure_channel('localhost:10009', creds)
|
||||||
stub = lnrpc.LightningStub(channel)
|
stub = lnrpc.LightningStub(channel)
|
||||||
|
Loading…
Reference in New Issue
Block a user