Index: sitescripts/subscriptions/bin/updateMalwareDomainsList.py |
diff --git a/sitescripts/subscriptions/bin/updateMalwareDomainsList.py b/sitescripts/subscriptions/bin/updateMalwareDomainsList.py |
index a2cfb5ff8d46bfe4534dc79f0f03f47e31257519..c2f208228717f4e3122a4bc95cbb39f6f66c8a36 100644 |
--- a/sitescripts/subscriptions/bin/updateMalwareDomainsList.py |
+++ b/sitescripts/subscriptions/bin/updateMalwareDomainsList.py |
@@ -60,7 +60,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 = codecs.open(path, 'wb') |
print >>file, FILTERLIST_HEADER |
@@ -80,7 +80,7 @@ def main(): |
if not domain: |
continue |
- print >>file, '||%s^' % domain.decode('idna') |
+ print >>file, '||%s^' % domain.decode('idna').encode('punycode') |
file.close() |
if subprocess.check_output(['hg', 'stat', '-R', tempdir]) != '': |