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:
parent
82fa347f2c
commit
4d3de3be04
1 changed files with 4 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue