Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: download_firefox_nightly.py

Issue 1457493002: Fix Firefox download mechanism. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/webrtc/webrtc.DEPS
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: download_firefox_nightly.py
diff --git a/download_firefox_nightly.py b/download_firefox_nightly.py
index 23cd6b0dab5bb5eea953e039fb66f1d44af1581a..719d3d0e5059d3c3323c1ef4e4498eb8ef318da7 100755
--- a/download_firefox_nightly.py
+++ b/download_firefox_nightly.py
@@ -22,7 +22,9 @@ THIRD_PARTY_DIR = os.path.abspath(os.path.join(BASE_DIR, 'third_party'))
sys.path.append(os.path.join(THIRD_PARTY_DIR, 'mozdownload'))
sys.path.append(os.path.join(THIRD_PARTY_DIR, 'mozinfo'))
+sys.path.append(os.path.join(THIRD_PARTY_DIR, 'requests'))
+from mozdownload import errors
from mozdownload import scraper
import utils
@@ -70,7 +72,7 @@ def _FindFallbackFirefoxBuild(target_dir):
def _MaybeDownload(target_dir, force):
try:
- downloader = scraper.DailyScraper(directory=target_dir, version=None)
+ downloader = scraper.DailyScraper(destination=target_dir)
filename = downloader.build_filename(downloader.binary)
firefox_archive = os.path.join(target_dir, filename)
@@ -85,7 +87,7 @@ def _MaybeDownload(target_dir, force):
downloader.download()
print 'Downloaded %s' % firefox_archive
return firefox_archive
- except scraper.NotFoundException as exception:
+ except errors.NotFoundError as exception:
print 'Failed to download firefox: %s.' % exception
fallback_build, age_days = _FindFallbackFirefoxBuild(target_dir)
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698