From 6b6a297a0ed84ac248b62010854ead520bced21b Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sun, 19 Nov 2017 17:38:23 +0000 Subject: [PATCH] Revert "correct 'import' in ac2e0a26ac" This reverts commit 620b2afa09c6a221ce8f8c4147b9b142b6e9facd. --- gramps/gen/plug/docgen/graphdoc.py | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/gramps/gen/plug/docgen/graphdoc.py b/gramps/gen/plug/docgen/graphdoc.py index d4dfc25bf..31da27655 100644 --- a/gramps/gen/plug/docgen/graphdoc.py +++ b/gramps/gen/plug/docgen/graphdoc.py @@ -8,9 +8,8 @@ # Copyright (C) 2007 Brian G. Matherly # Copyright (C) 2009 Benny Malengier # Copyright (C) 2009 Gary Burton -# Copyright (C) 2013 Mindaugas Baranauskas +# Copyright (C) 2017 Mindaugas Baranauskas # Copyright (C) 2017 Paul Culley -# Copyright (C) 2017 Paul Franklin # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -912,15 +911,6 @@ class GVPdfGsDoc(GVDocBase): options.menu.get_option_by_name('dpi').set_value(72) GVDocBase.__init__(self, options, paper_style) - def init(self): - """ - tell the user how to enable this output format, if necessary - """ - if _GS_CMD == '': - from ...errors import ReportError - raise ReportError(_("'Ghostscript' is not installed"), - _("Use your package manager to install it")) - def close(self): """ Implements GVPdfGsDoc.close() """ GVDocBase.close(self) @@ -1017,11 +1007,12 @@ FORMATS = [] if _DOT_FOUND: - FORMATS += [{'type' : "gspdf", - 'ext' : "pdf", - 'descr': _("PDF (Ghostscript)"), - 'mime' : "application/pdf", - 'class': GVPdfGsDoc}] + if _GS_CMD != "": + FORMATS += [{'type' : "gspdf", + 'ext' : "pdf", + 'descr': _("PDF (Ghostscript)"), + 'mime' : "application/pdf", + 'class': GVPdfGsDoc}] FORMATS += [{'type' : "gvpdf", 'ext' : "pdf",