]> granicus.if.org Git - python/commitdiff
Issue #3762: platform.architecture() fails if python is lanched via its symbolic...
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Thu, 4 Sep 2008 11:21:28 +0000 (11:21 +0000)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Thu, 4 Sep 2008 11:21:28 +0000 (11:21 +0000)
Reviewed Amaury Forgeot d'Arc (Backport of r66213)

Lib/platform.py

index f34e73559231ecc37bce1b3287dd06f899e4ece7..0df65db80c9cfa3c57b1924a5e51f8e86db55a97 100755 (executable)
@@ -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=''):