1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 14:16:00 +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: if self.get(name) is None:
missing.append(name) missing.append(name)
if len(missing) > 0: if len(missing) > 0:
print("Missing required setting%s: %s." print("Missing required setting%s: %s." % ('s' if len(missing) > 1 else '',
% ('s' if len(missing) > 1 else '', ', '.join(missing)), file=sys.stderr) ', '.join(missing)),
file=sys.stderr)
sys.exit(1) sys.exit(1)
class ServiceProxy(object): class ServiceProxy:
""" """
Proxy for a JSON-RPC web service. Calls to a function attribute Proxy for a JSON-RPC web service. Calls to a function attribute
generates a JSON-RPC call to the host service. If a callback 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) return Proxy(self, method, id=self.id)
class Proxy(object): class Proxy:
def __init__(self, service, method, id=None): def __init__(self, service, method, id=None):
self.service = service self.service = service
self.method = method self.method = method