Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Unified Diff: third_party/pylint/checkers/misc.py

Issue 776883002: pylint: upgrade to 1.4.0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pylint/checkers/logging.py ('k') | third_party/pylint/checkers/newstyle.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pylint/checkers/misc.py
===================================================================
--- third_party/pylint/checkers/misc.py (revision 293207)
+++ third_party/pylint/checkers/misc.py (working copy)
@@ -21,6 +21,7 @@
from pylint.interfaces import IRawChecker
from pylint.checkers import BaseChecker
+import six
MSGS = {
@@ -72,8 +73,8 @@
def _check_encoding(self, lineno, line, file_encoding):
try:
- return unicode(line, file_encoding)
- except UnicodeDecodeError, ex:
+ return six.text_type(line, file_encoding)
+ except UnicodeDecodeError as ex:
self.add_message('invalid-encoded-data', line=lineno,
args=(file_encoding, ex.args[2]))
« no previous file with comments | « third_party/pylint/checkers/logging.py ('k') | third_party/pylint/checkers/newstyle.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698