зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1361849 - Fix handling of HTTPError when the update snippet cannot be retrieved. r=maja_zf
Re-raising an HTTPError with a modified reason would require 6 parameters which we do not have at this point. So re-raise a normal Exception instead. MozReview-Commit-ID: J9ws4IMDy3g --HG-- extra : rebase_source : 59af3f6fa28ea4a0057419e340ef011abfcf10a2
This commit is contained in:
Родитель
e9665f4b28
Коммит
1442e63ce9
|
@ -360,14 +360,13 @@ class SoftwareUpdate(BaseLib):
|
|||
|
||||
:param update_url: URL to the update snippet
|
||||
"""
|
||||
try:
|
||||
import urllib2
|
||||
try:
|
||||
response = urllib2.urlopen(update_url)
|
||||
return response.read()
|
||||
except Exception:
|
||||
except urllib2.URLError:
|
||||
exc, val, tb = sys.exc_info()
|
||||
|
||||
raise exc, "Failed to retrieve update snippet: {}".format(val.reason), tb
|
||||
raise Exception, "Failed to retrieve update snippet: {}".format(val), tb
|
||||
|
||||
def get_formatted_update_url(self, force=False):
|
||||
"""Retrieve the formatted AUS update URL the update snippet is retrieved from.
|
||||
|
|
Загрузка…
Ссылка в новой задаче