mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Whitespace normalization.
This commit is contained in:
parent
f655328483
commit
8ac1495a6a
20 changed files with 100 additions and 101 deletions
|
@ -238,16 +238,16 @@ def abspath(path):
|
|||
|
||||
# realpath is a no-op on systems without islink support
|
||||
def realpath(path):
|
||||
path = abspath(path)
|
||||
try:
|
||||
import macfs
|
||||
except ImportError:
|
||||
return path
|
||||
if not path:
|
||||
return path
|
||||
components = path.split(':')
|
||||
path = components[0] + ':'
|
||||
for c in components[1:]:
|
||||
path = join(path, c)
|
||||
path = macfs.ResolveAliasFile(path)[0].as_pathname()
|
||||
return path
|
||||
path = abspath(path)
|
||||
try:
|
||||
import macfs
|
||||
except ImportError:
|
||||
return path
|
||||
if not path:
|
||||
return path
|
||||
components = path.split(':')
|
||||
path = components[0] + ':'
|
||||
for c in components[1:]:
|
||||
path = join(path, c)
|
||||
path = macfs.ResolveAliasFile(path)[0].as_pathname()
|
||||
return path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue