edx/diff-cover — pull request #73 by anentropic (2014-05-01 13:59:58+00:00)
Title: UnicodeDecodeError from _parse_source_sections

I am guessing this is because the diff includes a utf8 encoded Python file (with some unicode chars in it)

The py file is saved as utf8 with the `# -*- coding: utf-8 -*-` line at the top

```
Traceback (most recent call last):
File "/Users/me/Documents/Dev/Work/project/.venv/bin/diff-cover", line 9, in
load_entry_point('diff-cover==0.4.0', 'console_scripts', 'diff-cover')()
File "/Users/me/Documents/Dev/Work/project/.venv/lib/python2.7/site-packages/diff_cover/tool.py", line 174, in main
html_report=arg_dict['html_report'],
File "/Users/me/Documents/Dev/Work/project/.venv/lib/python2.7/site-packages/diff_cover/tool.py", line 144, in generate_coverage_report
reporter.generate_report(output_file)
File "/Users/me/Documents/Dev/Work/project/.venv/lib/python2.7/site-packages/diff_cover/report_generator.py", line 211, in generate_report
report = template.render(self._context())
File "/Users/me/Documents/Dev/Work/project/.venv/lib/python2.7/site-packages/diff_cover/report_generator.py", line 236, in _context
(src, self._src_path_stats(src)) for src in self.src_paths()
File "/Users/me/Documents/Dev/Work/project/.venv/lib/python2.7/site-packages/diff_cover/report_generator.py", line 82, in src_paths
return set(src for src, summary in self._diff_violations.items()
File "/Users/me/Documents/Dev/Work/project/.venv/lib/python2.7/site-packages/lazy/lazy.py", line 28, in __get__
value = self.__func(inst)
File "/Users/me/Documents/Dev/Work/project/.venv/lib/python2.7/site-packages/diff_cover/report_generator.py", line 175, in _diff_violations
) for src_path in self._diff.src_paths_changed()
File "/Users/me/Documents/Dev/Work/project/.venv/lib/python2.7/site-packages/diff_cover/diff_reporter.py", line 85, in src_paths_changed
diff_dict = self._git_diff()
File "/Users/me/Documents/Dev/Work/project/.venv/lib/python2.7/site-packages/diff_cover/diff_reporter.py", line 129, in _git_diff
diff_dict = self._parse_diff_str(diff_str)
File "/Users/me/Documents/Dev/Work/project/.venv/lib/python2.7/site-packages/diff_cover/diff_reporter.py", line 173, in _parse_diff_str
sections_dict = self._parse_source_sections(diff_str)
File "/Users/me/Documents/Dev/Work/project/.venv/lib/python2.7/site-packages/diff_cover/diff_reporter.py", line 203, in _parse_source_sections
for line in diff_str.split('\n'):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 54599: ordinal not in range(128)
```