Commit a94abe57 authored by Hirokazu Yamamoto's avatar Hirokazu Yamamoto

Issue #3762: platform.architecture() fails if python is lanched via its symbolic link.

Reviewed Amaury Forgeot d'Arc (Backport of r66213)
parent ffd40fa2
...@@ -793,7 +793,7 @@ def _follow_symlinks(filepath): ...@@ -793,7 +793,7 @@ def _follow_symlinks(filepath):
filepath = _abspath(filepath) filepath = _abspath(filepath)
while os.path.islink(filepath): while os.path.islink(filepath):
filepath = os.path.normpath( filepath = os.path.normpath(
os.path.join(filepath,os.readlink(filepath))) os.path.join(os.path.dirname(filepath),os.readlink(filepath)))
return filepath return filepath
def _syscmd_uname(option,default=''): def _syscmd_uname(option,default=''):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment