diff options
author | Craig Northway <craig.northway@gmail.com> | 2014-07-18 08:35:59 +1000 |
---|---|---|
committer | David Black <dblack@atlassian.com> | 2014-11-12 13:32:07 +1100 |
commit | eb52c96d7e849e68fda40e4fa7908434e7b0b022 (patch) | |
tree | 6627b3f5ffa650280169ec3bcc851432cfbb404f /git | |
parent | f03e6162f99e4bfdd60c08168dabef3a1bdb1825 (diff) | |
download | gitpython-eb52c96d7e849e68fda40e4fa7908434e7b0b022.tar.gz |
Fixing unicode types
(cherry picked from commit ca2b901e7229fc5c793762fd4e4c1c38c5a78e80)
Diffstat (limited to 'git')
-rw-r--r-- | git/cmd.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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)) |