Configtool: use platform.startswith() everywhere.
Using this instead of a direct comparison may make the code more future proof, because exact versions (e.g. "win32" vs. "win64") are ignored, then.
This commit is contained in:
parent
c135c4c502
commit
bb275e2c21
|
|
@ -157,7 +157,7 @@ class BoardPanel(wx.Panel):
|
|||
if not self.confirmLoseChanges("load a new board configuration"):
|
||||
return
|
||||
|
||||
if platform == "darwin":
|
||||
if platform.startswith("darwin"):
|
||||
# Mac OS X appears to be a bit limited on wildcards.
|
||||
wildcard = "Board configuration (board.*.h)|*.h"
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ class Build(wx.Dialog):
|
|||
# Windows. Without this it always drops this error message:
|
||||
# collect2.exe: error: ld returned 5 exit status 255
|
||||
# Just enabling verbose messages allows ld.exe to complete without failure.
|
||||
if platform == "win32":
|
||||
if platform.startswith("win"):
|
||||
cmdpath += " -Wl,-V"
|
||||
|
||||
ofiles = ["\"" + join(self.root, "build", f) + "\""
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ BSIZE = (100, 60)
|
|||
BSIZESMALL = (90, 30)
|
||||
|
||||
|
||||
if platform == "win32":
|
||||
if platform.startswith("win"):
|
||||
offsetTcLabel = 4
|
||||
offsetChLabel = 4
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ class PrinterPanel(wx.Panel):
|
|||
if not self.confirmLoseChanges("load a new printer configuration"):
|
||||
return
|
||||
|
||||
if platform == "darwin":
|
||||
if platform.startswith("darwin"):
|
||||
# Mac OS X appears to be a bit limited on wildcards.
|
||||
wildcard = "Printer configuration (printer.*.h)|*.h"
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue