From 7e8412226ffe0c046177fa6d838362bfbde60cd0 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 28 Feb 2017 16:30:24 -0500 Subject: BF: there is no exc variable, raising NotASurrogateError if that is the right thing todo --- git/compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/compat.py') diff --git a/git/compat.py b/git/compat.py index a2403d69..484f2391 100644 --- a/git/compat.py +++ b/git/compat.py @@ -204,7 +204,7 @@ def replace_surrogate_encode(mystring): # The following magic comes from Py3.3's Python/codecs.c file: if not 0xD800 <= code <= 0xDCFF: # Not a surrogate. Fail with the original exception. - raise exc + raise NotASurrogateError # mybytes = [0xe0 | (code >> 12), # 0x80 | ((code >> 6) & 0x3f), # 0x80 | (code & 0x3f)] -- cgit v1.2.1