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

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..16586be9aa79641424513e89af024c2a53e7ae70 100755
--- a/download_firefox_nightly.py
+++ b/download_firefox_nightly.py
@@ -20,10 +20,12 @@ from optparse import OptionParser
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
THIRD_PARTY_DIR = os.path.abspath(os.path.join(BASE_DIR, 'third_party'))
+sys.path.append(os.path.join(THIRD_PARTY_DIR, 'requests'))
kjellander_chromium 2015/11/18 06:53:50 nit: sort alphabetically
phoglund_chromium 2015/11/18 14:03:37 Done.
sys.path.append(os.path.join(THIRD_PARTY_DIR, 'mozdownload'))
sys.path.append(os.path.join(THIRD_PARTY_DIR, 'mozinfo'))
from mozdownload import scraper
kjellander_chromium 2015/11/18 06:53:50 nit: sort alphabetically
phoglund_chromium 2015/11/18 14:03:37 Done.
+from mozdownload import errors
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