1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Plugin bitcoind_: improve style

This commit is contained in:
Lars Kruse 2019-07-23 21:08:31 +02:00
parent ea051b7f3c
commit a0aa955a2d

View file

@ -194,12 +194,13 @@ class Options(dict):
if self.get(name) is None:
missing.append(name)
if len(missing) > 0:
print("Missing required setting%s: %s."
% ('s' if len(missing) > 1 else '', ', '.join(missing)), file=sys.stderr)
print("Missing required setting%s: %s." % ('s' if len(missing) > 1 else '',
', '.join(missing)),
file=sys.stderr)
sys.exit(1)
class ServiceProxy(object):
class ServiceProxy:
"""
Proxy for a JSON-RPC web service. Calls to a function attribute
generates a JSON-RPC call to the host service. If a callback
@ -219,7 +220,7 @@ class ServiceProxy(object):
return Proxy(self, method, id=self.id)
class Proxy(object):
class Proxy:
def __init__(self, service, method, id=None):
self.service = service
self.method = method