[engine/popup] Make tkinter module optional

If tkinter is not available, status bar should still work as expected
(but all the popup functionality will not work and likely throw errors).
This commit is contained in:
Tobias Witek 2017-06-16 15:36:56 +02:00
parent d5875827fa
commit ba843355eb
2 changed files with 5 additions and 1 deletions

View file

@ -42,6 +42,7 @@ def main():
inp.stop()
sys.exit(0)
except BaseException as e:
if not engine: raise
module = engine.current_module()
logging.exception(e)
if output.started():

View file

@ -4,7 +4,10 @@ try:
import Tkinter as tk
except ImportError:
# python 3
import tkinter as tk
try:
import tkinter as tk
except ImportError:
pass
import logging