summaryrefslogtreecommitdiff
path: root/gr-wxgui/python/wxgui/stdgui2.py
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2013-12-14 19:05:44 +0100
committerSylvain Munaut <tnt@246tNt.com>2013-12-20 01:30:44 +0100
commita0170049b0f6b1d3b1209530aaa6bb38e5324695 (patch)
tree4d33de50a888bd28bef89c6f696266ed66fc81d7 /gr-wxgui/python/wxgui/stdgui2.py
parent37fcb46ff02459d6d00368745e579c1d4b1f5f65 (diff)
wx: Only call XInitThreads for linux
Turns out OSX also returns 'posix' for os.name. This limits it to linux only. Note that it's purely cosmetic because on OSX it would just print a warning but not prevent anything from working. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'gr-wxgui/python/wxgui/stdgui2.py')
-rw-r--r--gr-wxgui/python/wxgui/stdgui2.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/gr-wxgui/python/wxgui/stdgui2.py b/gr-wxgui/python/wxgui/stdgui2.py
index d983dd58cd..53b389dd3c 100644
--- a/gr-wxgui/python/wxgui/stdgui2.py
+++ b/gr-wxgui/python/wxgui/stdgui2.py
@@ -22,7 +22,6 @@
'''A simple wx gui for GNU Radio applications'''
import ctypes
-import os
import wx
import sys
from gnuradio import gr
@@ -36,7 +35,7 @@ class stdapp (wx.App):
self._nstatus = nstatus
self._max_noutput_items = max_noutput_items
# If we're on Linux, also enable multi-threading Xlib access
- if os.name == 'posix':
+ if sys.platform.startswith('linux'):
try:
x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads()