Index: filters/get_subscriptions.py |
diff --git a/filters/get_subscriptions.py b/filters/get_subscriptions.py |
index e87459808f6956f4dadbb6eec51d3779cc9f4345..c038f2c4947684228c4a1e0173f790515a73f722 100644 |
--- a/filters/get_subscriptions.py |
+++ b/filters/get_subscriptions.py |
@@ -17,11 +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") |
+ return [] |
Sebastian Noack
2016/02/19 17:10:18
Nit: An empty line below would improve the reading
juliandoucette
2016/02/19 17:25:16
Done.
|
result = {} |
utf8_reader = codecs.getreader('utf8') |
source = urllib.urlopen("https://hg.adblockplus.org/subscriptionlist/archive/default.tar.gz") |