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

Unified Diff: sitescripts/extensions/utils.py

Issue 29355414: Issue 1483 - Add exception handling so if one repo has errors others are not affected (Closed)
Patch Set: Created Sept. 30, 2016, 10:44 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
@@ -13,16 +13,17 @@
# You should have received a copy of the GNU General Public License
# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
import codecs
import os
import json
import re
import subprocess
+import traceback
import time
import urlparse
import urllib
import xml.dom.minidom as dom
from ConfigParser import SafeConfigParser, NoOptionError
from StringIO import StringIO
from sitescripts.utils import get_config
@@ -307,26 +308,28 @@
def getDownloadLinks(result):
"""
gets the download links for all extensions and puts them into the config
object
"""
for repo in Configuration.getRepositoryConfigurations():
- (downloadURL, version) = _getDownloadLink(repo)
- if downloadURL == None:
+ try:
+ (downloadURL, version) = _getDownloadLink(repo)
+ except:
+ traceback.print_exc()
continue
if not result.has_section(repo.repositoryName):
result.add_section(repo.repositoryName)
result.set(repo.repositoryName, 'downloadURL', downloadURL)
result.set(repo.repositoryName, 'version', version)
qrcode = _getQRCode(downloadURL)
- if qrcode != None:
+ if qrcode is not None:
result.set(repo.repositoryName, 'qrcode', qrcode)
def writeLibabpUpdateManifest(path, updates):
"""
Writes update.json file for libadblockplus
"""
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld