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. 9
      contrib/pylightning/lightning/lightning.py

9
contrib/pylightning/lightning/lightning.py

@ -78,10 +78,13 @@ 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.
"""
peers = self.getpeers()['peers']
if log_level:
peers = self.getpeers(log_level)['peers']
else:
peers = self.getpeers()['peers']
for p in peers:
if p['peerid'] == peer_id:
return p

Loading…
Cancel
Save