| 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]))
|
|
|
|
|