Skip to content
Snippets Groups Projects
Commit ef247ed0 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

Bugfix to fsl.utils.platform introduced by recent refactorings - wxplatform

was always returning unknown. Also adjusted wx properties so they can be
queried if a gui is not open, but is available.
parent ad11aa6e
No related branches found
No related tags found
No related merge requests found
...@@ -233,7 +233,7 @@ class Platform(notifier.Notifier): ...@@ -233,7 +233,7 @@ class Platform(notifier.Notifier):
:data:`WX_MAC_CARBON`, or :data:`WX_GTK`, indicating the wx platform. :data:`WX_MAC_CARBON`, or :data:`WX_GTK`, indicating the wx platform.
""" """
if not self.haveGui: if not self.canHaveGui:
return WX_UNKNOWN return WX_UNKNOWN
import wx import wx
...@@ -245,7 +245,7 @@ class Platform(notifier.Notifier): ...@@ -245,7 +245,7 @@ class Platform(notifier.Notifier):
elif any(['gtk' in p for p in pi]): plat = WX_GTK elif any(['gtk' in p for p in pi]): plat = WX_GTK
else: plat = WX_UNKNOWN else: plat = WX_UNKNOWN
if platform is WX_UNKNOWN: if plat is WX_UNKNOWN:
log.warning('Could not determine wx platform from ' log.warning('Could not determine wx platform from '
'information: {}'.format(pi)) 'information: {}'.format(pi))
...@@ -258,7 +258,7 @@ class Platform(notifier.Notifier): ...@@ -258,7 +258,7 @@ class Platform(notifier.Notifier):
indicating the wx flavour. indicating the wx flavour.
""" """
if not self.haveGui: if not self.canHaveGui:
return WX_UNKNOWN return WX_UNKNOWN
import wx import wx
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment