Switched to using Python 3.4.
This commit is contained in:
parent
768ef58434
commit
a8f69c2a62
8 changed files with 82 additions and 97 deletions
11
utils.py
11
utils.py
|
|
@ -20,16 +20,9 @@ def get_temp_dir():
|
|||
return tempfile.gettempdir()
|
||||
|
||||
def path_join(base, *rest):
|
||||
try:
|
||||
base = base.decode('utf-8')
|
||||
except UnicodeEncodeError:
|
||||
base = unicode(base)
|
||||
new_rest = []
|
||||
for i in xrange(len(rest)):
|
||||
try:
|
||||
new_rest.append(rest[i].decode('utf-8'))
|
||||
except UnicodeEncodeError:
|
||||
new_rest.append(unicode(rest[i]))
|
||||
for i in range(len(rest)):
|
||||
new_rest.append(str(rest[i]))
|
||||
|
||||
rpath = u'/'.join(new_rest)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue