diff options
author | Vincent Driessen <me@nvie.com> | 2016-04-19 21:34:24 +0200 |
---|---|---|
committer | Vincent Driessen <me@nvie.com> | 2016-04-19 21:34:24 +0200 |
commit | 722473e86e64405ac5eb9cb43133f8953d6c65d0 (patch) | |
tree | 36deae50e1769afaa235fd61dc292e4f33a3871d | |
parent | 28afef550371cd506db2045cbdd89d895bec5091 (diff) | |
download | gitpython-722473e86e64405ac5eb9cb43133f8953d6c65d0.tar.gz |
Remove Python 2.6 hack
Since support was dropped.
-rw-r--r-- | git/compat.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/git/compat.py b/git/compat.py index f018ef33..7bd8e494 100644 --- a/git/compat.py +++ b/git/compat.py @@ -48,20 +48,13 @@ else: def mviter(d): return d.itervalues() -PRE_PY27 = sys.version_info < (2, 7) - def safe_decode(s): """Safely decodes a binary string to unicode""" if isinstance(s, unicode): return s elif isinstance(s, bytes): - if PRE_PY27: - # Python 2.6 does not support the `errors` argument, so we cannot - # control the replacement of unsafe chars in it. - return s.decode(defenc) - else: - return s.decode(defenc, errors='replace') + return s.decode(defenc, errors='replace') raise TypeError('Expected bytes or text, but got %r' % (s,)) |