From 8fc867ae72c1488a436d72a41a86bc31a5c47962 Mon Sep 17 00:00:00 2001 From: Nico Tonnhofer Date: Thu, 18 Apr 2019 09:09:45 +0200 Subject: [PATCH] configtool: fix wx test --- configtool/gui.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/configtool/gui.py b/configtool/gui.py index 4a17bec..4b63f9b 100644 --- a/configtool/gui.py +++ b/configtool/gui.py @@ -2,9 +2,17 @@ import sys import time try: - import wx - if wx.__version__[0] < 4: - print("Configtool needs wxPython 4.x. Please check https://wxpython.org/pages/downloads/.") + import wx + if int(wx.__version__[0]) < 4: + print("Configtool needs wxPython 4.x. Please check https://wxpython.org/pages/downloads/.") + time.sleep(10) + sys.exit(-1) +except: + print( + "ImportError: No module named wx\n\n" + "wxPython is not installed. This program requires wxPython to run.\n" + "See your package manager and/or https://wxpython.org/pages/downloads/." + ) time.sleep(10) sys.exit(-1) except: