From de4999bdd45f673fe2210f1439ba50e0b88cddda Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 28 Feb 2017 16:30:24 -0500 Subject: [PATCH] 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(-) diff --git a/git/compat.py b/git/compat.py index a2403d69c..484f2391d 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)]