monitor: fix flake8 nits

This commit is contained in:
Michael Schmoock
2020-12-13 00:52:04 +01:00
committed by Christian Decker
parent 7e89f5751d
commit 8796f6c6b0

View File

@@ -4,6 +4,7 @@ This is a quick hack and adapted plugin from the summary.py plugin (orinigally w
This one is adapted by Rene Pickhardt and aims to help you identify inactive channels quickly
"""
from packaging import version
import pyln.client
import json
@@ -11,11 +12,12 @@ plugin = pyln.client.Plugin()
# __version__ was introduced in 0.0.7.1, with utf8 passthrough support.
try:
if version.parse(lightning.__version__) >= version.parse("0.0.7.1"):
if version.parse(lightning.__version__) >= version.parse("0.0.7.1"): # noqa F821
have_utf8 = True
except Exception:
pass
@plugin.method("monitor")
def monitor(plugin):
"""Monitors channels of this node."""
@@ -65,4 +67,5 @@ def monitor(plugin):
def init(options, configuration, plugin):
plugin.log("Plugin monitor.py initialized")
plugin.run()