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

Unified Diff: abp/filters/render_script.py

Issue 29341320: Noissue - Added flake8-abp and pep8-naming extension and fix reported warnings (Closed)
Patch Set: Fixed some broken string literals in Python 2 Created May 12, 2016, 3:27 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
Index: abp/filters/render_script.py
===================================================================
--- a/abp/filters/render_script.py
+++ b/abp/filters/render_script.py
@@ -14,7 +14,7 @@
# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
import argparse
-import codecs
+import io
import logging
import sys
@@ -55,7 +55,7 @@
try:
lines = render_filterlist(args.infile, sources, TopSource())
- with codecs.open(args.outfile, 'wb', encoding='utf-8') as out_fp:
+ with io.open(args.outfile, 'w', encoding='utf-8') as out_fp:
for line in lines:
out_fp.write(line.to_string() + '\n')
except (MissingHeader, NotFound, IncludeError) as exc:
« no previous file with comments | « abp/filters/parser.py ('k') | abp/filters/renderer.py » ('j') | tests/test_render_script.py » ('J')

Powered by Google App Engine
This is Rietveld