]> granicus.if.org Git - python/commitdiff
Merged revisions 66104 via svnmerge from
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Mon, 1 Sep 2008 14:35:47 +0000 (14:35 +0000)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Mon, 1 Sep 2008 14:35:47 +0000 (14:35 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r66104 | hirokazu.yamamoto | 2008-09-01 23:32:58 +0900 | 2 lines

  Issue #3748: platform.architecture() printed vogus message on windows.
  Reviewed by Marc-Andre Lemburg.
........

Lib/platform.py

index 01821803535549a9f9a696328c53478f727aba05..27ea1b490fad6bfb32f73b91c086af9569261fa1 100755 (executable)
@@ -940,6 +940,9 @@ def _syscmd_file(target,default=''):
         case the command should fail.
 
     """
+    if sys.platform in ('dos','win32','win16','os2'):
+        # XXX Others too ?
+        return default
     target = _follow_symlinks(target)
     try:
         f = os.popen('file %s 2> /dev/null' % target)