]> granicus.if.org Git - python/commitdiff
Issue #3748: platform.architecture() printed vogus message on windows.
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Mon, 1 Sep 2008 14:32:58 +0000 (14:32 +0000)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Mon, 1 Sep 2008 14:32:58 +0000 (14:32 +0000)
Reviewed by Marc-Andre Lemburg.

Lib/platform.py

index 9d64e76501cab5a99542c98f77eaa1a22890b233..73b6fdb67639c4e938a194ef34962420b6733b75 100755 (executable)
@@ -964,6 +964,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)