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

Unified Diff: sitescripts/subscriptions/bin/updateMalwareDomainsList.py

Issue 29321060: Issue 2719 - Decode domains when generating the "Malware Domains" list (Closed)
Patch Set: Created June 24, 2015, 12:02 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: sitescripts/subscriptions/bin/updateMalwareDomainsList.py
===================================================================
--- a/sitescripts/subscriptions/bin/updateMalwareDomainsList.py
+++ b/sitescripts/subscriptions/bin/updateMalwareDomainsList.py
@@ -17,11 +17,9 @@
import os, subprocess, codecs, urllib, zipfile, tempfile, shutil
from StringIO import StringIO
-from sitescripts.utils import get_config, setupStderr
+from sitescripts.utils import get_config
if __name__ == '__main__':
- setupStderr()
-
repository = get_config().get('subscriptionDownloads', 'malwaredomains_repository')
tempdir = tempfile.mkdtemp(prefix='malwaredomains')
try:
@@ -44,7 +42,7 @@
for line in str(zip.read(info.filename)).splitlines():
if not line:
continue
- print >>file, '||%s^' % line.strip().decode('iso-8859-1')
+ print >>file, '||%s^' % line.strip().decode('idna')
file.close();
if subprocess.check_output(['hg', 'stat', '-R', tempdir]) != '':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld