Skip to content

Commit 7e84122

Browse files
yarikopticByron
authored andcommitted
BF: there is no exc variable, raising NotASurrogateError if that is the right thing todo
1 parent 72dddc7 commit 7e84122

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎git/compat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def replace_surrogate_encode(mystring):
204204
# The following magic comes from Py3.3's Python/codecs.c file:
205205
if not 0xD800 <= code <= 0xDCFF:
206206
# Not a surrogate. Fail with the original exception.
207-
raise exc
207+
raise NotASurrogateError
208208
# mybytes = [0xe0 | (code >> 12),
209209
# 0x80 | ((code >> 6) & 0x3f),
210210
# 0x80 | (code & 0x3f)]

0 commit comments

Comments
 (0)