Author: Ronan Lamy <[email protected]>
Branch: unicode-utf8
Changeset: r93328:08976d2691b2
Date: 2017-12-09 13:44 +0000
http://bitbucket.org/pypy/pypy/changeset/08976d2691b2/
Log: fix call_errorhandler()
diff --git a/pypy/module/_codecs/interp_codecs.py
b/pypy/module/_codecs/interp_codecs.py
--- a/pypy/module/_codecs/interp_codecs.py
+++ b/pypy/module/_codecs/interp_codecs.py
@@ -70,9 +70,6 @@
raise oefmt(space.w_IndexError,
"position %d from error handler out of bounds",
newpos)
- if newpos < startpos:
- raise oefmt(space.w_IndexError,
- "position %d from error handler did not progress", newpos)
w_replace = space.convert_to_w_unicode(w_replace)
return w_replace._utf8, newpos
return call_errorhandler
@@ -226,7 +223,7 @@
w_end = space.getattr(w_exc, space.newtext('end'))
end = space.int_w(w_end)
start = w_obj._index_to_byte(start)
- end = w_obj._index_to_byte(end)
+ end = w_obj._index_to_byte(end)
builder = StringBuilder()
pos = start
obj = w_obj._utf8
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit