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

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

Issue 29821558: Issue #6707 - Make the generated malware domain filter list encode domains as Punycode (Closed)
Patch Set: Updated encoding format Created July 6, 2018, 11:51 a.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 | « .gitignore ('k') | sitescripts/subscriptions/test/test_updateMalwareDomainsList.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/subscriptions/bin/updateMalwareDomainsList.py
diff --git a/sitescripts/subscriptions/bin/updateMalwareDomainsList.py b/sitescripts/subscriptions/bin/updateMalwareDomainsList.py
index a2cfb5ff8d46bfe4534dc79f0f03f47e31257519..8f573dc8f86161b38f63f41d671a945530f9567a 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')
Sebastian Noack 2018/07/06 18:23:25 codecs.open() without specifying an encoding is eq
Sebastian Noack 2018/07/09 11:59:29 That is what I'm suggesting.
Tudor Avram 2018/07/09 13:35:42 Done.
print >>file, FILTERLIST_HEADER
@@ -80,7 +80,7 @@ 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]) != '':
« no previous file with comments | « .gitignore ('k') | sitescripts/subscriptions/test/test_updateMalwareDomainsList.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld