4646: reports cannot be run from the command line in a non-GUI environment -- partial fix
svn: r18556
This commit is contained in:
@@ -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
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user