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

Unified Diff: filters/get_subscriptions.py

Issue 29336582: Issue 2813 - Catch missing sitescripts module and return empty list on adblockplus.org (Closed)
Patch Set: Added empty line to improve reading flow Created Feb. 19, 2016, 5:24 p.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: filters/get_subscriptions.py
diff --git a/filters/get_subscriptions.py b/filters/get_subscriptions.py
index e87459808f6956f4dadbb6eec51d3779cc9f4345..790f98fe468738f7c7494a4d12636a4a7b0169bd 100644
--- a/filters/get_subscriptions.py
+++ b/filters/get_subscriptions.py
@@ -17,10 +17,15 @@ import codecs
import os
import tarfile
import urllib
+import logging
from ConfigParser import SafeConfigParser
def get_subscriptions(_):
- from sitescripts.subscriptions import subscriptionParser
+ try:
+ from sitescripts.subscriptions import subscriptionParser
+ except ImportError:
+ logging.warning("Unable to import sitescripts, proceeding with empty subscriptions list")
kzar 2016/02/19 17:57:14 Nit: This line is too long (but I think the messag
juliandoucette 2016/02/23 14:50:27 Done.
+ return []
result = {}
utf8_reader = codecs.getreader('utf8')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld