Configtool: allow all Windows versions, not just "win32".

This is work related to issue #158.
This commit is contained in:
Markus Hitter 2015-06-04 19:05:34 +02:00
parent 8b63505d53
commit b74b066db5
1 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import os, re
from os.path import isfile, join from os.path import isfile, join
from sys import platform from sys import platform
if platform == "win32": if platform.startswith("win"):
from _subprocess import STARTF_USESHOWWINDOW from _subprocess import STARTF_USESHOWWINDOW
(scriptEvent, EVT_SCRIPT_UPDATE) = wx.lib.newevent.NewEvent() (scriptEvent, EVT_SCRIPT_UPDATE) = wx.lib.newevent.NewEvent()
@ -67,7 +67,7 @@ class ScriptThread:
return self.running return self.running
def Run(self): def Run(self):
if platform == "win32": if platform.startswith("win"):
startupinfo = subprocess.STARTUPINFO() startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= STARTF_USESHOWWINDOW startupinfo.dwFlags |= STARTF_USESHOWWINDOW
@ -76,7 +76,7 @@ class ScriptThread:
wx.PostEvent(self.win, evt) wx.PostEvent(self.win, evt)
args = shlex.split(str(cmd)) args = shlex.split(str(cmd))
try: try:
if platform == "win32": if platform.startswith("win"):
p = subprocess.Popen(args, stderr = subprocess.STDOUT, p = subprocess.Popen(args, stderr = subprocess.STDOUT,
stdout = subprocess.PIPE, stdout = subprocess.PIPE,
startupinfo = startupinfo) startupinfo = startupinfo)