mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 17:31:36 +00:00
labels plugin: response must be OK before we continue
This commit is contained in:
parent
c2813c5b15
commit
1b346b1aeb
1 changed files with 2 additions and 1 deletions
|
@ -221,7 +221,8 @@ class Plugin(BasePlugin):
|
||||||
connection = httplib.HTTPConnection(self.target_host)
|
connection = httplib.HTTPConnection(self.target_host)
|
||||||
connection.request("GET", ("/api/wallets/%s/labels.json?auth_token=%s" % (self.wallet_id, self.auth_token())),"", {'Content-Type': 'application/json'})
|
connection.request("GET", ("/api/wallets/%s/labels.json?auth_token=%s" % (self.wallet_id, self.auth_token())),"", {'Content-Type': 'application/json'})
|
||||||
response = connection.getresponse()
|
response = connection.getresponse()
|
||||||
if response.reason == httplib.responses[httplib.NOT_FOUND]:
|
if response.status != 200:
|
||||||
|
print_error("Cannot retrieve labels:", response.status, response.reason)
|
||||||
return
|
return
|
||||||
response = json.loads(response.read())
|
response = json.loads(response.read())
|
||||||
if "error" in response:
|
if "error" in response:
|
||||||
|
|
Loading…
Add table
Reference in a new issue