Skip to content

Commit

Permalink
Frosted cannot handle non-utf-8 encoded files at the moment - see tim…
Browse files Browse the repository at this point in the history
…othycrosley/deprecated.frosted#53

Therefore (since pyflakes overlaps heavily and does not have the same problem) we will simply suppress that error. If you do get it working correctly, you only end up with a "CannotDecodeFile" error anyway which is not useful to the user of prospector, nor is it actually a problem of the file but rather of frosted.
  • Loading branch information
carlio committed Sep 13, 2014
1 parent d12421c commit 081ee98
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion prospector/tools/frosted/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ def run(self):
if any([ip.search(relpath) for ip in self._ignores]):
continue

check_path(filepath, reporter)
# Frosted cannot handle non-utf-8 encoded files at the moment -
# see https://github.com/timothycrosley/frosted/issues/53
# Therefore (since pyflakes overlaps heavily and does not have the same
# problem) we will simply suppress that error. If you do get it working
# correctly, you only end up with a "CannotDecodeFile" error anyway which
# is not useful to the user of prospector, nor is it actually a problem
# of the file but rather of frosted.
try:
check_path(filepath, reporter)
except UnicodeDecodeError:
pass

return reporter.get_messages()

0 comments on commit 081ee98

Please sign in to comment.