From 8f1bbb681121c5b4df9f193631be10476497e122 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Wed, 13 Oct 2010 08:46:58 +0000 Subject: [PATCH] Issue 4291, wrong path when cancel. svn: r15976 --- src/Utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Utils.py b/src/Utils.py index e2fa9f071..0fd5bd9d4 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -335,8 +335,8 @@ def get_unicode_path_from_file_chooser(path): :rtype: unicode :returns: The Unicode version of path. """ - # Don't make unicode of unicode - if isinstance(path, unicode): + # make omly unicode of path of type 'str' + if not (isinstance(path, str)): return path if constfunc.win(): @@ -362,7 +362,8 @@ def get_unicode_path_from_env_var(path): :rtype: unicode :returns: The Unicode version of path. """ - if isinstance(path, unicode): + # make omly unicode of path of type 'str' + if not (isinstance(path, str)): return path if constfunc.win():