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

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

Issue 29333567: Issue 3521 - Worked around Malware Domains List breaking YouTube (Closed)
Patch Set: Created Jan. 15, 2016, 11:30 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 | « 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
@@ -40,9 +40,15 @@
zip = zipfile.ZipFile(StringIO(data), 'r')
info = zip.infolist()[0]
for line in str(zip.read(info.filename)).splitlines():
- if not line:
+ domain = line.strip()
+ if not domain:
continue
- print >>file, '||%s^' % line.strip().decode('idna')
+
+ # HACK: Ignore entry that currently breaks YouTube, see #3521
+ if domain == 's.ytimg.com':
+ continue
+
+ print >>file, '||%s^' % domain.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