Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-unidiff does not gracefully handle encoding #41

Open
wontonst opened this issue Jan 25, 2017 · 0 comments
Open

python-unidiff does not gracefully handle encoding #41

wontonst opened this issue Jan 25, 2017 · 0 comments

Comments

@wontonst
Copy link

Here is a snippet from the diff file

+\373e(attlist (("ID" ID IMPLIED) ("LANG" CDATA IMPLIED) ("REMAP" CDATA IMPLIED) ("XREFL\
ABEL" CDATA IMPLIED) ("REVISIONFLAG" (name-token-group ("CHANGED" "ADDED" "DELETED" "OFF\
")) IMPLIED) ("ARCH" CDATA IMPLIED) ("CONFORMANCE" NMTOKENS IMPLIED) ("OS" CDATA IMPLIED\
) ("REVISION" CDATA IMPLIED) ("USERLEVEL" CDATA IMPLIED) ("VENDOR" CDATA IMPLIED) ("ROLE\
" CDATA IMPLIED)))
+^@\200^B^@9^]^A\246^A\206^A^X^A\247^A^Y^A\373S^A\373E^A4^A^U^A5^A\264^A\304^A\263^A\344\
^A6^A\315^A^O^A\340^A<^A\373
+^A\373,^A\373#^A\373T^AJ^A^T^A\373F^A\316^A\356^A\207^A        ^A\373Y^A\221^A_^A`^AY^A\
\373^\^A\357^Af^A\262^A\373^]^A\373c^A\373N^A\234^A=^Ab^A*^A\373d^A\323^A\337^A^N^A\373&\
^A^C^A\317^A\3739^A\245^A!^A9!^A\245^A\3739^A\317^A^C^A\373&^A^N^A\337^A\323^A\373d^A*^A\
b^A=^A\234^A\373N^A\373c^A\373^]^A\262^Af^A\357^A\373^\^AY^A`^A_^A\221^A\373Y^A ^A\207^A\
\356^A\316^A\373F^A^T^AJ^A\373T^A\373#^A\373,^A\373

This is the error I get.

  File "/tmp/cov_venv/local/lib/python2.7/site-packages/unidiff/patch.py", line 195, in _parse_hunk
    raise UnidiffParseError('Hunk diff line {}: expected: {}'.format(diff_line_no, line))
unidiff.errors.UnidiffParseError: Hunk diff line 4068036: expected: SE456<

Line 4068036 is the last line in the diff input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant