handle util.popup ImportError gracefully

* util.popup requires tkinter to be installed (in order to display
  popups). As most people will probably use the default configuration
  of the pulseaudio module (where the popup is disabled) and in order
  to avoid breaking existing setups, we catch import errors and just log
  them.
This commit is contained in:
Bernhard B 2022-03-25 19:29:37 +01:00
parent 82fa347f2c
commit 4d3de3be04

View file

@ -43,8 +43,11 @@ import core.input
import util.cli
import util.graph
import util.format
import util.popup
try:
import util.popup
except ImportError as e:
logging.warning("Couldn't import util.popup: %s. Popups won't work!", e)
class Module(core.module.Module):
def __init__(self, config, theme, channel):