improve add-on downloading error readability
This commit is contained in:
parent
139e04c7c3
commit
4116ab65b0
@ -60,14 +60,10 @@ class Downloader(QThread):
|
|||||||
self.error = _("Invalid code, or add-on not available for your version of Anki.")
|
self.error = _("Invalid code, or add-on not available for your version of Anki.")
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
self.error = _("Error downloading: %s" % resp.status_code)
|
self.error = _("Unexpected response code: %s" % resp.status_code)
|
||||||
return
|
return
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
exc = traceback.format_exc()
|
self.error = _("Please check your internet connection.") + "\n\n" + str(e)
|
||||||
try:
|
|
||||||
self.error = str(e[0])
|
|
||||||
except:
|
|
||||||
self.error = str(exc)
|
|
||||||
return
|
return
|
||||||
finally:
|
finally:
|
||||||
remHook("httpRecv", recvEvent)
|
remHook("httpRecv", recvEvent)
|
||||||
|
Loading…
Reference in New Issue
Block a user