Index: sitescripts/subscriptions/bin/updateMalwareDomainsList.py |
diff --git a/sitescripts/subscriptions/bin/updateMalwareDomainsList.py b/sitescripts/subscriptions/bin/updateMalwareDomainsList.py |
index a2cfb5ff8d46bfe4534dc79f0f03f47e31257519..93d8644f28cd0c72e4c606d021a8ae5451087f8b 100644 |
--- a/sitescripts/subscriptions/bin/updateMalwareDomainsList.py |
+++ b/sitescripts/subscriptions/bin/updateMalwareDomainsList.py |
@@ -15,7 +15,6 @@ |
import os |
import subprocess |
-import codecs |
import contextlib |
import urllib2 |
import zipfile |
@@ -60,7 +59,7 @@ def main(): |
subprocess.check_call(['hg', '-q', 'up', '-R', tempdir, '-r', 'default']) |
path = os.path.join(tempdir, 'malwaredomains_full.txt') |
- file = codecs.open(path, 'wb', encoding='utf-8') |
+ file = open(path, 'wb') |
print >>file, FILTERLIST_HEADER |
@@ -80,11 +79,13 @@ def main(): |
if not domain: |
continue |
- print >>file, '||%s^' % domain.decode('idna') |
+ print >>file, '||%s^' % domain |
file.close() |
if subprocess.check_output(['hg', 'stat', '-R', tempdir]) != '': |
- subprocess.check_call(['hg', '-q', 'commit', '-R', tempdir, '-A', '-u', 'hgbot', '-m', 'Updated malwaredomains.com data']) |
+ subprocess.check_call(['hg', '-q', 'commit', '-R', tempdir, '-A', |
+ '-u', 'hgbot', '-m', |
+ 'Updated malwaredomains.com data']) |
subprocess.check_call(['hg', '-q', 'push', '-R', tempdir]) |
finally: |
shutil.rmtree(tempdir, ignore_errors=True) |