8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5de21c7 commit aae2a73Copy full SHA for aae2a73
git/compat.py
@@ -56,7 +56,9 @@ def safe_decode(s):
56
return s
57
elif isinstance(s, six.binary_type):
58
if PRE_PY27:
59
- return s.decode(defenc) # we're screwed
+ # Python 2.6 does not support the `errors` argument, so we cannot
60
+ # control the replacement of unsafe chars in it.
61
+ return s.decode(defenc)
62
else:
63
return s.decode(defenc, errors='replace')
64
raise TypeError('Expected bytes or text, but got %r' % (s,))
0 commit comments