Loading django/utils/_os.py +7 −7 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ import os import stat from os.path import join, normcase, normpath, abspath, isabs, sep from django.utils.encoding import force_text from django.utils import six try: WindowsError = WindowsError Loading @@ -10,13 +11,12 @@ except NameError: pass # Define our own abspath function that can handle joining # unicode paths to a current working directory that has non-ASCII # characters in it. This isn't necessary on Windows since the # Windows version of abspath handles this correctly. The Windows # abspath also handles drive letters differently than the pure # Python implementation, so it's best not to replace it. if os.name == 'nt': # Under Python 2, define our own abspath function that can handle joining # unicode paths to a current working directory that has non-ASCII characters # in it. This isn't necessary on Windows since the Windows version of abspath # handles this correctly. It also handles drive letters differently than the # pure Python implementation, so it's best not to replace it. if six.PY3 or os.name == 'nt': abspathu = abspath else: def abspathu(path): Loading Loading
django/utils/_os.py +7 −7 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ import os import stat from os.path import join, normcase, normpath, abspath, isabs, sep from django.utils.encoding import force_text from django.utils import six try: WindowsError = WindowsError Loading @@ -10,13 +11,12 @@ except NameError: pass # Define our own abspath function that can handle joining # unicode paths to a current working directory that has non-ASCII # characters in it. This isn't necessary on Windows since the # Windows version of abspath handles this correctly. The Windows # abspath also handles drive letters differently than the pure # Python implementation, so it's best not to replace it. if os.name == 'nt': # Under Python 2, define our own abspath function that can handle joining # unicode paths to a current working directory that has non-ASCII characters # in it. This isn't necessary on Windows since the Windows version of abspath # handles this correctly. It also handles drive letters differently than the # pure Python implementation, so it's best not to replace it. if six.PY3 or os.name == 'nt': abspathu = abspath else: def abspathu(path): Loading