Changeset 11656:9b2551185ee8 in orange for Orange/utils/addons.py


Ignore:
Timestamp:
08/12/13 18:58:19 (8 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed use of subprocess.STARTF_USESHOWWINDOW flag.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/utils/addons.py

    r11655 r11656  
    310310        # script 
    311311        startupinfo = subprocess.STARTUPINFO() 
    312         startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW 
     312        if hasattr(subprocess, "STARTF_USESHOWWINDOW"): 
     313            startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW 
     314        else: 
     315            # This flag was missing in inital releases of 2.7 
     316            startupinfo.dwFlags |= subprocess._subprocess.STARTF_USESHOWWINDOW 
     317 
    313318        extra_kwargs["startupinfo"] = startupinfo 
    314319 
Note: See TracChangeset for help on using the changeset viewer.