From ba843355ebda39cbf4b3b7de13a61630acbe96f8 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Fri, 16 Jun 2017 15:36:56 +0200 Subject: [PATCH] [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). --- bumblebee-status | 1 + bumblebee/popup.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bumblebee-status b/bumblebee-status index 1f94410..4745e40 100755 --- a/bumblebee-status +++ b/bumblebee-status @@ -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(): diff --git a/bumblebee/popup.py b/bumblebee/popup.py index 5a288c4..1142664 100644 --- a/bumblebee/popup.py +++ b/bumblebee/popup.py @@ -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