Skip to content
Snippets Groups Projects
Commit 785dea0e authored by Sander Mathijs van Veen's avatar Sander Mathijs van Veen
Browse files

Fixed ignored KeyboardInterrupt exception.

parent b200b18e
No related branches found
No related tags found
No related merge requests found
......@@ -130,7 +130,11 @@ cdef public void py_input(object parser, char *buf, int *result, int max_size):
if parser.verbose:
print '\npy_input: want to read up to %s bytes' % max_size
raw = parser.read(max_size)
try:
raw = parser.read(max_size)
except KeyboardInterrupt:
raw = ''
buflen = PyInt_AsLong(len(raw))
result[0] = buflen
memcpy(buf, PyString_AsString(raw), buflen)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment