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

Reviewed by Amaury Forgeot d'Arc.
This commit is contained in:
Hirokazu Yamamoto 2008-09-04 11:15:14 +00:00
parent 65d66e1006
commit 171c4aae4e
1 changed files with 1 additions and 1 deletions

View File

@ -933,7 +933,7 @@ def _follow_symlinks(filepath):
filepath = _abspath(filepath)
while os.path.islink(filepath):
filepath = os.path.normpath(
os.path.join(filepath,os.readlink(filepath)))
os.path.join(os.path.dirname(filepath),os.readlink(filepath)))
return filepath
def _syscmd_uname(option,default=''):