File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -59,12 +59,12 @@ Requirements
5959
6060* A Python interpreter; either
6161
62+ * Python 3.x, version 3.3 or later.
63+
6264 * Python 2.x, version 2.6 or later. If you are using Python
6365 2.6.x, then you have to install the ``argparse `` module yourself,
6466 as it was only added to the standard library in Python 2.7.
6567
66- * Python 3.x, version 3.3 or later.
67-
6868* A recent version of Git.
6969
7070Bash completion requires Git's completion being available.
Original file line number Diff line number Diff line change @@ -243,21 +243,21 @@ def communicate(process, input=None):
243243 return (output , error )
244244
245245
246- if sys .hexversion < 0x03000000 :
247- # In Python 2 .x, os.environ keys and values must be byte
246+ if sys .hexversion >= 0x03000000 :
247+ # In Python 3 .x, os.environ keys and values must be unicode
248248 # strings:
249249 def env_encode (s ):
250- """Encode unicode keys or values for use in os.environ."""
250+ """Use unicode keys or values unchanged in os.environ."""
251251
252- return s . encode ( PREFERRED_ENCODING )
252+ return s
253253
254254else :
255- # In Python 3 .x, os.environ keys and values must be unicode
255+ # In Python 2 .x, os.environ keys and values must be byte
256256 # strings:
257257 def env_encode (s ):
258- """Use unicode keys or values unchanged in os.environ."""
258+ """Encode unicode keys or values for use in os.environ."""
259259
260- return s
260+ return s . encode ( PREFERRED_ENCODING )
261261
262262
263263class UncleanWorkTreeError (Failure ):
You can’t perform that action at this time.
0 commit comments