From 6ee612109c02a0d2a322a446209a29addd8f78be Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Fri, 10 Jun 2016 14:21:58 -0700 Subject: [PATCH] Remove buggy _xmlplus imports It hasn't been maintained upstream for years and isn't in most operating systems anymore (any?). https://gramps-project.org/bugs/view.php?id=6947#c31672 provides a link to this: http://fedoraproject.org/wiki/Features/RemovePyXML#Detailed_Description I don't think it belongs in gramps. --- gramps/gen/plug/_options.py | 8 ++------ gramps/gen/plug/docgen/stylesheet.py | 5 +---- gramps/gen/plug/report/_book.py | 8 ++------ gramps/gen/plug/report/_options.py | 5 +---- gramps/gen/plug/report/_paper.py | 5 +---- gramps/gui/aboutdialog.py | 5 +---- 6 files changed, 8 insertions(+), 28 deletions(-) diff --git a/gramps/gen/plug/_options.py b/gramps/gen/plug/_options.py index b79f98b77..33a94b1a3 100644 --- a/gramps/gen/plug/_options.py +++ b/gramps/gen/plug/_options.py @@ -39,12 +39,8 @@ import sys # SAX interface # #------------------------------------------------------------------------- -try: - from xml.sax import make_parser, handler, SAXParseException - from xml.sax.saxutils import quoteattr -except: - from _xmlplus.sax import make_parser, handler, SAXParseException - from _xmlplus.sax.saxutils import quoteattr +from xml.sax import make_parser, handler, SAXParseException +from xml.sax.saxutils import quoteattr #------------------------------------------------------------------------- # diff --git a/gramps/gen/plug/docgen/stylesheet.py b/gramps/gen/plug/docgen/stylesheet.py index bbed730b3..4c08e6cef 100644 --- a/gramps/gen/plug/docgen/stylesheet.py +++ b/gramps/gen/plug/docgen/stylesheet.py @@ -60,10 +60,7 @@ log = logging.getLogger(".stylesheet") # SAX interface # #------------------------------------------------------------------------- -try: - from xml.sax import make_parser, handler, SAXParseException -except ImportError: - from _xmlplus.sax import make_parser, handler, SAXParseException +from xml.sax import make_parser, handler, SAXParseException #------------------------------------------------------------------------ # diff --git a/gramps/gen/plug/report/_book.py b/gramps/gen/plug/report/_book.py index 27c3f5db2..53a5b050c 100644 --- a/gramps/gen/plug/report/_book.py +++ b/gramps/gen/plug/report/_book.py @@ -47,12 +47,8 @@ import os # SAX interface # #------------------------------------------------------------------------- -try: - from xml.sax import make_parser, handler, SAXParseException - from xml.sax.saxutils import escape -except: - from _xmlplus.sax import make_parser, handler, SAXParseException - from _xmlplus.sax.saxutils import escape +from xml.sax import make_parser, handler, SAXParseException +from xml.sax.saxutils import escape #------------------------------------------------------------------------- # diff --git a/gramps/gen/plug/report/_options.py b/gramps/gen/plug/report/_options.py index 75bce5963..e79e1b791 100644 --- a/gramps/gen/plug/report/_options.py +++ b/gramps/gen/plug/report/_options.py @@ -44,10 +44,7 @@ def escxml(word): # SAX interface # #------------------------------------------------------------------------- -try: - from xml.sax import make_parser, SAXParseException -except: - from _xmlplus.sax import make_parser, SAXParseException +from xml.sax import make_parser, SAXParseException #------------------------------------------------------------------------- # diff --git a/gramps/gen/plug/report/_paper.py b/gramps/gen/plug/report/_paper.py index ce796b9f2..f0a7d9a09 100644 --- a/gramps/gen/plug/report/_paper.py +++ b/gramps/gen/plug/report/_paper.py @@ -40,10 +40,7 @@ from ...const import PAPERSIZE # Try to abstract SAX1 from SAX2 # #------------------------------------------------------------------------- -try: - from xml.sax import make_parser, handler, SAXParseException -except: - from _xmlplus.sax import make_parser, handler, SAXParseException +from xml.sax import make_parser, handler, SAXParseException #------------------------------------------------------------------------- # diff --git a/gramps/gui/aboutdialog.py b/gramps/gui/aboutdialog.py index 4ecf227e6..246d34bb7 100644 --- a/gramps/gui/aboutdialog.py +++ b/gramps/gui/aboutdialog.py @@ -31,10 +31,7 @@ import sys ##import logging ##_LOG = logging.getLogger(".GrampsAboutDialog") -try: - from xml.sax import make_parser, handler, SAXParseException -except ImportError: - from _xmlplus.sax import make_parser, handler, SAXParseException +from xml.sax import make_parser, handler, SAXParseException #------------------------------------------------------------------------- #