mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
log error response when fail to check wakatime-cli version or download binary
This commit is contained in:
parent
389c84673e
commit
650bb6fa26
@ -843,12 +843,15 @@ def request(url, last_modified=None):
|
|||||||
resp = urlopen(url)
|
resp = urlopen(url)
|
||||||
headers = dict(resp.getheaders()) if is_py2 else resp.headers
|
headers = dict(resp.getheaders()) if is_py2 else resp.headers
|
||||||
return headers, resp.read(), resp.getcode()
|
return headers, resp.read(), resp.getcode()
|
||||||
except HTTPError as err:
|
except HTTPError as err2:
|
||||||
if err.code == 304:
|
if err2.code == 304:
|
||||||
return None, None, 304
|
return None, None, 304
|
||||||
|
log(DEBUG, err.read().decode())
|
||||||
|
log(DEBUG, err2.read().decode())
|
||||||
raise
|
raise
|
||||||
except IOError:
|
except IOError:
|
||||||
raise
|
raise
|
||||||
|
log(DEBUG, err.read().decode())
|
||||||
raise
|
raise
|
||||||
except IOError:
|
except IOError:
|
||||||
if is_py2:
|
if is_py2:
|
||||||
@ -860,6 +863,7 @@ def request(url, last_modified=None):
|
|||||||
except HTTPError as err:
|
except HTTPError as err:
|
||||||
if err.code == 304:
|
if err.code == 304:
|
||||||
return None, None, 304
|
return None, None, 304
|
||||||
|
log(DEBUG, err.read().decode())
|
||||||
raise
|
raise
|
||||||
except IOError:
|
except IOError:
|
||||||
raise
|
raise
|
||||||
|
Loading…
Reference in New Issue
Block a user