find_file and find_folder do not return null string if the file or folder resp. do not exist (coding typo)
svn: r21267
This commit is contained in:
parent
b34eea702b
commit
a50e83fa5f
@ -70,7 +70,10 @@ def find_file( filename):
|
||||
if os.path.isfile(fname):
|
||||
return fname
|
||||
except UnicodeError:
|
||||
return ''
|
||||
pass
|
||||
|
||||
# not found
|
||||
return ''
|
||||
|
||||
def find_folder( filename):
|
||||
# try the filename we got
|
||||
@ -84,7 +87,10 @@ def find_folder( filename):
|
||||
if os.path.isdir(fname):
|
||||
return fname
|
||||
except UnicodeError:
|
||||
return ''
|
||||
pass
|
||||
|
||||
# not found
|
||||
return ''
|
||||
|
||||
def get_unicode_path_from_file_chooser(path):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user