7646: [Unit test] typo on 'gramps.gen.utils.file.py'
Replace the call with ensuring that dirname is unicode; since TMP_DIR is guaranteed to be, os.path.join() willl return a unicode so further conversion is unnecessary.
This commit is contained in:
parent
9e0adbad8d
commit
4327f6952b
@ -95,11 +95,10 @@ def get_empty_tempdir(dirname):
|
|||||||
or for inadequate permissions to delete dir/files or create dir(s)
|
or for inadequate permissions to delete dir/files or create dir(s)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
dirpath = os.path.join(TEMP_DIR,dirname)
|
dirpath = os.path.join(TEMP_DIR,cuni(dirname))
|
||||||
if os.path.isdir(dirpath):
|
if os.path.isdir(dirpath):
|
||||||
shutil.rmtree(dirpath)
|
shutil.rmtree(dirpath)
|
||||||
os.makedirs(dirpath)
|
os.makedirs(dirpath)
|
||||||
dirpath = get_unicode_path_from_env_var(dirpath)
|
|
||||||
return dirpath
|
return dirpath
|
||||||
|
|
||||||
def rm_tempdir(path):
|
def rm_tempdir(path):
|
||||||
|
Loading…
Reference in New Issue
Block a user