##// END OF EJS Templates
Revert "IPython/utils/path.py: Sometimes this system encoding just won't work. So, we try to use it if we can, but fallback to UTF8 if it simply won't work."...
John Kirkham -
Show More
@@ -441,12 +441,8 b' def ensure_dir_exists(path, mode=0o755):'
441 try:
441 try:
442 path_exists = os.path.exists(path)
442 path_exists = os.path.exists(path)
443 except UnicodeEncodeError:
443 except UnicodeEncodeError:
444 try:
444 path = path.encode(sys.getfilesystemencoding() or "utf8")
445 path = path.encode(sys.getfilesystemencoding() or "utf8")
445 path_exists = os.path.exists(path)
446 path_exists = os.path.exists(path)
447 except UnicodeEncodeError:
448 path = path.encode("utf8")
449 path_exists = os.path.exists(path)
450
446
451 if not os.path.exists(path):
447 if not os.path.exists(path):
452 try:
448 try:
General Comments 0
You need to be logged in to leave comments. Login now