diff --git a/src/Filters/__init__.py b/src/Filters/__init__.py index 5f1a1c07a..809160764 100644 --- a/src/Filters/__init__.py +++ b/src/Filters/__init__.py @@ -48,8 +48,11 @@ def reload_custom_filters(): if not CustomFilters: reload_custom_filters() -from _FilterComboBox import FilterComboBox -from _FilterMenu import build_filter_model -from _FilterStore import FilterStore -from _SearchBar import SearchBar +try: # the Gramps-Connect server has no DISPLAY + from _FilterComboBox import FilterComboBox + from _FilterMenu import build_filter_model + from _FilterStore import FilterStore + from _SearchBar import SearchBar +except: + pass from _SearchFilter import SearchFilter, ExactSearchFilter diff --git a/src/plugins/docgen/GtkPrint.py b/src/plugins/docgen/GtkPrint.py index c86c72c8a..e6022bfea 100644 --- a/src/plugins/docgen/GtkPrint.py +++ b/src/plugins/docgen/GtkPrint.py @@ -60,11 +60,13 @@ log = logging.getLogger(".GtkPrint") # GTK modules # #------------------------------------------------------------------------- -import gtk import cairo - -if gtk.pygtk_version < (2, 10, 0): - raise Errors.UnavailableError(_("PyGtk 2.10 or later is required")) +try: # the Gramps-Connect server has no DISPLAY + import gtk + if gtk.pygtk_version < (2, 10, 0): + raise Errors.UnavailableError(_("PyGtk 2.10 or later is required")) +except: + pass #------------------------------------------------------------------------ #