You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.
docker run -it -v $(pwd)/crash.py:/crash.py python:3-alpine sh
In the docker shell:
pip install -q requests parsepatch six
python /crash.py
You should get the following exception:
Traceback (most recent call last):
File "/crash.py", line 4, in <module>
Patch.parse_patch(r.content)
File "/usr/local/lib/python3.7/site-packages/parsepatch/patch.py", line 84, in parse_patch
return p.parse()
File "/usr/local/lib/python3.7/site-packages/parsepatch/patch.py", line 342, in parse
while self.next_diff():
File "/usr/local/lib/python3.7/site-packages/parsepatch/patch.py", line 206, in next_diff
for line in self.get_lines:
File "/usr/local/lib/python3.7/site-packages/parsepatch/patch.py", line 129, in _lines
if self._check(line):
File "/usr/local/lib/python3.7/site-packages/parsepatch/patch.py", line 150, in _check
return self.conditions[-1](line)
File "/usr/local/lib/python3.7/site-packages/parsepatch/patch.py", line 205, in <lambda>
self._condition(lambda x: not x.startswith('diff --git a/') and not x.startswith('diff -r '))
AttributeError: 'int' object has no attribute 'startswith'
Which does not happen with Patch.parse_patch(r.content.decode('utf-8'))
The text was updated successfully, but these errors were encountered:
Happens in Docker using python:3-alpine (i discovered that running on Heroku):
To reproduce, write that file as
crash.py
:Then run as:
In the docker shell:
You should get the following exception:
Which does not happen with
Patch.parse_patch(r.content.decode('utf-8'))
The text was updated successfully, but these errors were encountered: