]> granicus.if.org Git - python/commitdiff
Merged revisions 66213 via svnmerge from
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Thu, 4 Sep 2008 11:24:53 +0000 (11:24 +0000)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Thu, 4 Sep 2008 11:24:53 +0000 (11:24 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r66213 | hirokazu.yamamoto | 2008-09-04 20:15:14 +0900 | 1 line

  Issue #3762: platform.architecture() fails if python is lanched via its symbolic link.
  Reviewed by Amaury Forgeot d'Arc.
........

Lib/platform.py

index 56ab759cfc07c3152ef3172477babd0a5627a6a8..740983b2cf1ddbb854e78e48edcef39016d59a79 100755 (executable)
@@ -909,7 +909,7 @@ def _follow_symlinks(filepath):
     filepath = os.path.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=''):