From 7d120690abc77dd9bab0a042bfaac846355e6237 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 19 May 2018 23:40:09 +0100 Subject: [PATCH] [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. --- deluge/ui/gtkui/torrentview.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py index 7adc6c2f4..814a5ce1d 100644 --- a/deluge/ui/gtkui/torrentview.py +++ b/deluge/ui/gtkui/torrentview.py @@ -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):