Commits

antonio  committed 12686ec

fix missing file test
(transplanted from 19a5828d1523a8308cf652d18eb1824e85d1c304)

  • Participants
  • Parent commits a1362bb

Comments (0)

Files changed (1)

File src/engine/SCons/Tool/MSCommon/vc.py

     installed_sdks=get_installed_sdks()
     for _sdk in installed_sdks:
         sdk_bat_file = _sdk.get_sdk_vc_script(host_arch,target_arch)
-        if sdk_bat_file and os.path.join(pdir,sdk_bat_file):
+        if not sdk_bat_file:
+            debug("vc.py:find_batch_file() not found:%s"%_sdk)
+        else:
             sdk_bat_file_path = os.path.join(pdir,sdk_bat_file)
-            debug('vc.py:find_batch_file() sdk_bat_file_path:%s'%sdk_bat_file_path)
+            if os.path.exists(sdk_bat_file_path): 
+                debug('vc.py:find_batch_file() sdk_bat_file_path:%s'%sdk_bat_file_path)
+                return (batfilename,sdk_bat_file_path)
+    return (batfilename,None)
 
-            return (batfilename,sdk_bat_file_path)
-        else:
-            debug("vc.py:find_batch_file() not found:%s"%_sdk)
-    else:
-        return (batfilename,None)
 
 __INSTALLED_VCS_RUN = None