Révision a0aa955a
Plugin bitcoind_: improve style
| plugins/currency/bitcoin/bitcoind_ | ||
|---|---|---|
| 194 | 194 |
if self.get(name) is None: |
| 195 | 195 |
missing.append(name) |
| 196 | 196 |
if len(missing) > 0: |
| 197 |
print("Missing required setting%s: %s."
|
|
| 198 |
% ('s' if len(missing) > 1 else '', ', '.join(missing)), file=sys.stderr)
|
|
| 197 |
print("Missing required setting%s: %s." % ('s' if len(missing) > 1 else '',
|
|
| 198 |
', '.join(missing)), |
|
| 199 |
file=sys.stderr) |
|
| 199 | 200 |
sys.exit(1) |
| 200 | 201 |
|
| 201 | 202 |
|
| 202 |
class ServiceProxy(object):
|
|
| 203 |
class ServiceProxy: |
|
| 203 | 204 |
""" |
| 204 | 205 |
Proxy for a JSON-RPC web service. Calls to a function attribute |
| 205 | 206 |
generates a JSON-RPC call to the host service. If a callback |
| ... | ... | |
| 219 | 220 |
return Proxy(self, method, id=self.id) |
| 220 | 221 |
|
| 221 | 222 |
|
| 222 |
class Proxy(object):
|
|
| 223 |
class Proxy: |
|
| 223 | 224 |
def __init__(self, service, method, id=None): |
| 224 | 225 |
self.service = service |
| 225 | 226 |
self.method = method |
Formats disponibles : Unified diff