Révision f5de3d19
Plugin bitcoind_: fix POST request body format
Python3 mandates "bytes" as the request body data type.
| plugins/currency/bitcoin/bitcoind_ | ||
|---|---|---|
| 235 | 235 |
'params': args, |
| 236 | 236 |
'id': self.id, |
| 237 | 237 |
} |
| 238 |
request = urllib.request.Request(self.service.url, json.dumps(data)) |
|
| 238 |
request = urllib.request.Request(self.service.url, json.dumps(data).encode())
|
|
| 239 | 239 |
if self.service.username: |
| 240 | 240 |
auth_string = '%s:%s' % (self.service.username, self.service.password) |
| 241 | 241 |
auth_b64 = base64.urlsafe_b64encode(auth_string.encode()).decode() |
Formats disponibles : Unified diff