summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authorCraig Northway <craig.northway@gmail.com>2014-07-18 08:35:59 +1000
committerDavid Black <dblack@atlassian.com>2014-11-12 13:32:07 +1100
commiteb52c96d7e849e68fda40e4fa7908434e7b0b022 (patch)
tree6627b3f5ffa650280169ec3bcc851432cfbb404f /git
parentf03e6162f99e4bfdd60c08168dabef3a1bdb1825 (diff)
downloadgitpython-eb52c96d7e849e68fda40e4fa7908434e7b0b022.tar.gz
Fixing unicode types
(cherry picked from commit ca2b901e7229fc5c793762fd4e4c1c38c5a78e80)
Diffstat (limited to 'git')
-rw-r--r--git/cmd.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/git/cmd.py b/git/cmd.py
index b3274dd8..73126fba 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -410,12 +410,16 @@ class Git(LazyMixin):
@classmethod
def __unpack_args(cls, arg_list):
if not isinstance(arg_list, (list,tuple)):
+ if isinstance(arg_list, unicode):
+ return [arg_list.encode('utf-8')]
return [ str(arg_list) ]
outlist = list()
for arg in arg_list:
if isinstance(arg_list, (list, tuple)):
outlist.extend(cls.__unpack_args( arg ))
+ elif isinstance(arg_list, unicode):
+ outlist.append(arg_list.encode('utf-8'))
# END recursion
else:
outlist.append(str(arg))