Browse Source

contrib/pylightning: allow getpeer with log level.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
committed by Christian Decker
parent
commit
be3b5f11e8
  1. 7
      contrib/pylightning/lightning/lightning.py

7
contrib/pylightning/lightning/lightning.py

@ -78,9 +78,12 @@ class LightningRpc(UnixDomainSocketRpc):
between calls, but it does not (yet) support concurrent calls.
"""
def getpeer(self, peer_id):
"""Get info about a specific peer.
def getpeer(self, peer_id, log_level=None):
"""Get info about a specific peer, optionally with its log.
"""
if log_level:
peers = self.getpeers(log_level)['peers']
else:
peers = self.getpeers()['peers']
for p in peers:
if p['peerid'] == peer_id:

Loading…
Cancel
Save