summaryrefslogtreecommitdiff
path: root/git/compat.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/compat.py')
-rw-r--r--git/compat.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git/compat.py b/git/compat.py
index cbfb5785..d6be6ede 100644
--- a/git/compat.py
+++ b/git/compat.py
@@ -62,7 +62,8 @@ def safe_decode(s):
return s
elif isinstance(s, bytes):
return s.decode(defenc, 'replace')
- raise TypeError('Expected bytes or text, but got %r' % (s,))
+ elif s is not None:
+ raise TypeError('Expected bytes or text, but got %r' % (s,))
def with_metaclass(meta, *bases):