summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2008-09-04 11:21:28 +0000
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2008-09-04 11:21:28 +0000
commitf4e2ccf3b3191a796b0b8631f686363b3b97dcce (patch)
tree297db357af7356f46a63f989e51f300a75d9004e
parentafa0d58a2d55fa157482e2006028688db6553f90 (diff)
downloadcpython-git-f4e2ccf3b3191a796b0b8631f686363b3b97dcce.tar.gz
Issue #3762: platform.architecture() fails if python is lanched via its symbolic link.
Reviewed Amaury Forgeot d'Arc (Backport of r66213)
-rwxr-xr-xLib/platform.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index f34e735592..0df65db80c 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -793,7 +793,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=''):