Skip to content

Commit ca2b901

Browse files
committed
Fixing unicode types
1 parent ad715a0 commit ca2b901

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

git/cmd.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,12 +421,16 @@ def transform_kwargs(self, **kwargs):
421421
@classmethod
422422
def __unpack_args(cls, arg_list):
423423
if not isinstance(arg_list, (list,tuple)):
424+
if isinstance(arg_list, unicode):
425+
return [arg_list.encode('utf-8')]
424426
return [ str(arg_list) ]
425427

426428
outlist = list()
427429
for arg in arg_list:
428430
if isinstance(arg_list, (list, tuple)):
429431
outlist.extend(cls.__unpack_args( arg ))
432+
elif isinstance(arg_list, unicode):
433+
outlist.append(arg_list.encode('utf-8'))
430434
# END recursion
431435
else:
432436
outlist.append(str(arg))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy