Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit722473e

Browse files
committed
Remove Python 2.6 hack
Since support was dropped.
1 parent28afef5 commit722473e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

‎git/compat.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,13 @@ def mviter(d):
4848
defmviter(d):
4949
returnd.itervalues()
5050

51-
PRE_PY27=sys.version_info< (2,7)
52-
5351

5452
defsafe_decode(s):
5553
"""Safely decodes a binary string to unicode"""
5654
ifisinstance(s,unicode):
5755
returns
5856
elifisinstance(s,bytes):
59-
ifPRE_PY27:
60-
# Python 2.6 does not support the `errors` argument, so we cannot
61-
# control the replacement of unsafe chars in it.
62-
returns.decode(defenc)
63-
else:
64-
returns.decode(defenc,errors='replace')
57+
returns.decode(defenc,errors='replace')
6558
raiseTypeError('Expected bytes or text, but got %r'% (s,))
6659

6760

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp