From 5ff36693b89351e5d74c696d3724c5afc5fe7510 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Mon, 31 Dec 2018 15:02:29 -0800 Subject: Remove impossible except UnicodeError reading a file in binary mode (`rb`) does not involve unicode --- pyflakes/api.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyflakes/api.py b/pyflakes/api.py index 4fcd27c..3ddb386 100644 --- a/pyflakes/api.py +++ b/pyflakes/api.py @@ -92,9 +92,6 @@ def checkPath(filename, reporter=None): try: with open(filename, 'rb') as f: codestr = f.read() - except UnicodeError: - reporter.unexpectedError(filename, 'problem decoding source') - return 1 except IOError: msg = sys.exc_info()[1] reporter.unexpectedError(filename, msg.args[1]) -- cgit v1.2.1