Bug 1256300 - Add timeout to mozharness urllib2.urlopen call; r=jlund

This commit is contained in:
Geoff Brown 2016-05-12 07:24:30 -06:00
Родитель aea682d7a3
Коммит 556dca5fa2
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -196,11 +196,10 @@ class TestingMixin(VirtualenvMixin, BuildbotMixin, ResourceMonitoringMixin,
# Check if the URL exists. If not, use none to allow mozcrash to auto-check for symbols
try:
if symbols_url:
self._urlopen(symbols_url)
self._urlopen(symbols_url, timeout=120)
self.symbols_url = symbols_url
except urllib2.URLError:
self.warning("Can't figure out symbols_url from installer_url: %s!" %
self.installer_url)
except (urllib2.URLError, socket.error, socket.timeout):
self.exception("Can't figure out symbols_url from installer_url: %s!" % self.installer_url, level=WARNING)
# If no symbols URL can be determined let minidump_stackwalk query the symbols.
# As of now this only works for Nightly and release builds.