Index: Lib/platform.py =================================================================== --- Lib/platform.py (revision 66179) +++ Lib/platform.py (working copy) @@ -925,17 +925,6 @@ _abspath = os.path.abspath -def _follow_symlinks(filepath): - - """ In case filepath is a symlink, follow it until a - real file is reached. - """ - filepath = _abspath(filepath) - while os.path.islink(filepath): - filepath = os.path.normpath( - os.path.join(filepath,os.readlink(filepath))) - return filepath - def _syscmd_uname(option,default=''): """ Interface to the system's uname command. @@ -967,7 +956,7 @@ if sys.platform in ('dos','win32','win16','os2'): # XXX Others too ? return default - target = _follow_symlinks(target) + target = os.path.realpath(target) try: f = os.popen('file "%s" 2> /dev/null' % target) except (AttributeError,os.error):