Log real exception when can't use Xorg API (#1066)

* fix: log real exception when can't use Xorg API

* chore: make linter happy
This commit is contained in:
Equidamoid 2021-02-08 23:55:10 +00:00 committed by GitHub
parent 2ea92db3ca
commit 8fccd84345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@
import os as _os
import os.path as _path
import sys as _sys
from logging import INFO as _INFO
from logging import getLogger
@ -50,7 +51,7 @@ try:
disp_prog = Display()
x11 = True
except Exception:
_log.warn('X11 not available - rules will not be activated')
_log.warn('X11 not available - rules will not be activated', exc_info=_sys.exc_info())
XK_KEYS = {}
x11 = False