[Docs] Fix Sphinx AutoDoc failing with gdk mask operation

The creation of a new mask from two gdk mask is causing a TypeError,
likely related to the mocking of gdk in Sphinx conf.
This commit is contained in:
Calum Lind 2018-05-19 23:40:09 +01:00
parent ee196f5035
commit 7d120690ab

View File

@ -26,7 +26,11 @@ from deluge.ui.gtkui.removetorrentdialog import RemoveTorrentDialog
log = logging.getLogger(__name__)
CTRL_ALT_MASK = CONTROL_MASK | MOD1_MASK
try:
CTRL_ALT_MASK = CONTROL_MASK | MOD1_MASK
except TypeError:
# Sphinx AutoDoc has a mock issue with gtk.gdk masks.
pass
def str_nocase_sort(model, iter1, iter2, data):