improved error handling

* log a warning message in case tkinter is not installed
This commit is contained in:
Bernhard B 2019-05-31 18:19:37 +02:00
parent 315328b41f
commit 6d49685715

View file

@ -1,5 +1,7 @@
"""Pop-up menus."""
import logging
try:
import Tkinter as tk
except ImportError:
@ -7,9 +9,7 @@ except ImportError:
try:
import tkinter as tk
except ImportError:
pass
import logging
logging.warning("failed to import tkinter - bumblebee popups won't work!")
class PopupMenu:
"""The popup-menu."""