Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/extensions/utils.py

Issue 29329268: Issue 3210 - Don`t fall back to our downloads for Firefox extensions (Closed)
Patch Set: Created Oct. 19, 2015, 11:32 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/extensions/utils.py
===================================================================
--- a/sitescripts/extensions/utils.py
+++ b/sitescripts/extensions/utils.py
@@ -327,34 +327,25 @@ def _getLocalLink(repo):
highestVersion = version
return (highestURL, highestVersion)
def _getDownloadLink(repo):
"""
gets the download link to the most current version of an extension
"""
- # you can't easily install extensions from third-party sources on Chrome
- # and Opera. So always get the link for the version on the Web Store.
if repo.galleryID:
if repo.type == "chrome":
return _getGoogleDownloadLink(repo.galleryID)
- if repo.type == "opera":
+ elif repo.type == "opera":
return _getOperaDownloadLink(repo.galleryID)
+ elif repo.type == "gecko":
+ return _getMozillaDownloadLink(repo.galleryID)
- (localURL, localVersion) = _getLocalLink(repo)
-
- # get a link to Firefox Add-Ons, if the latest version has been published there
- if repo.type == 'gecko' and repo.galleryID:
- (galleryURL, galleryVersion) = _getMozillaDownloadLink(repo.galleryID)
- if not localVersion or (galleryVersion and
- compareVersions(galleryVersion, localVersion) >= 0):
- return (galleryURL, galleryVersion)
-
- return (localURL, localVersion)
+ return _getLocalLink(repo)
def _getQRCode(text):
try:
import qrcode
import base64
import Image # required by qrcode but not formally a dependency
except:
return None
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld