diff --git a/ndiff/ndiff.py b/ndiff/ndiff.py index a8706f265..502bfd7b1 100755 --- a/ndiff/ndiff.py +++ b/ndiff/ndiff.py @@ -18,6 +18,11 @@ import difflib import getopt import sys import time + +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + import xml.sax import xml.sax.saxutils import xml.dom.minidom diff --git a/ndiff/ndifftest.py b/ndiff/ndifftest.py index 96f83f959..82c184ebb 100755 --- a/ndiff/ndifftest.py +++ b/ndiff/ndifftest.py @@ -5,6 +5,11 @@ import subprocess import sys import unittest + +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + import xml.dom.minidom import StringIO diff --git a/zenmap/radialnet/core/XMLHandler.py b/zenmap/radialnet/core/XMLHandler.py index 0423986c0..518b324bc 100644 --- a/zenmap/radialnet/core/XMLHandler.py +++ b/zenmap/radialnet/core/XMLHandler.py @@ -119,6 +119,11 @@ # * * # ***************************************************************************/ + +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + import xml.sax import xml.sax.saxutils from xml.sax.xmlreader import AttributesImpl as Attributes diff --git a/zenmap/share/zenmap/locale/xgettext-profile_editor.py b/zenmap/share/zenmap/locale/xgettext-profile_editor.py index 9645671db..eb0f13cf1 100755 --- a/zenmap/share/zenmap/locale/xgettext-profile_editor.py +++ b/zenmap/share/zenmap/locale/xgettext-profile_editor.py @@ -6,6 +6,11 @@ import getopt import os import sys + +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + import xml.sax directory = None diff --git a/zenmap/zenmapCore/Diff.py b/zenmap/zenmapCore/Diff.py index 1022a5e4e..fd0dfa88c 100644 --- a/zenmap/zenmapCore/Diff.py +++ b/zenmap/zenmapCore/Diff.py @@ -125,6 +125,10 @@ import os import subprocess import sys import tempfile +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + import xml.sax from zenmapCore.Name import APP_NAME diff --git a/zenmap/zenmapCore/NmapParser.py b/zenmap/zenmapCore/NmapParser.py index fef3a6ee5..0f7360c87 100644 --- a/zenmap/zenmapCore/NmapParser.py +++ b/zenmap/zenmapCore/NmapParser.py @@ -128,6 +128,10 @@ import socket import StringIO import copy +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + from types import StringTypes from xml.sax import make_parser from xml.sax import SAXException diff --git a/zenmap/zenmapGUI/About.py b/zenmap/zenmapGUI/About.py index 3eafd5667..054c14cef 100644 --- a/zenmap/zenmapGUI/About.py +++ b/zenmap/zenmapGUI/About.py @@ -139,6 +139,11 @@ from zenmapCore.Version import VERSION from zenmapCore.Paths import Path import zenmapCore.I18N + +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + # For escaping text in marked-up labels. from xml.sax.saxutils import escape diff --git a/zenmap/zenmapGUI/BugReport.py b/zenmap/zenmapGUI/BugReport.py index 70ce40c86..a0eabbd75 100644 --- a/zenmap/zenmapGUI/BugReport.py +++ b/zenmap/zenmapGUI/BugReport.py @@ -127,6 +127,11 @@ from zenmapGUI.higwidgets.higboxes import HIGVBox from zenmapCore.Name import APP_DISPLAY_NAME, NMAP_DISPLAY_NAME, NMAP_WEB_SITE import zenmapCore.I18N + +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + # For escaping text in marked-up labels. from xml.sax.saxutils import escape diff --git a/zenmap/zenmapGUI/CrashReport.py b/zenmap/zenmapGUI/CrashReport.py index b9f83c256..fca9e62c3 100644 --- a/zenmap/zenmapGUI/CrashReport.py +++ b/zenmap/zenmapGUI/CrashReport.py @@ -131,6 +131,11 @@ from zenmapCore.Name import APP_DISPLAY_NAME from zenmapCore.Version import VERSION import zenmapCore.I18N + +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + # For escaping text in marked-up labels. from xml.sax.saxutils import escape diff --git a/zenmap/zenmapGUI/DiffCompare.py b/zenmap/zenmapGUI/DiffCompare.py index a51853858..f5fa0ff77 100644 --- a/zenmap/zenmapGUI/DiffCompare.py +++ b/zenmap/zenmapGUI/DiffCompare.py @@ -126,6 +126,11 @@ import pango import os import os.path import sys + +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + import xml.sax from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog, HIGDialog diff --git a/zenmap/zenmapGUI/MainWindow.py b/zenmap/zenmapGUI/MainWindow.py index b9ce3f7c0..52abeaa72 100644 --- a/zenmap/zenmapGUI/MainWindow.py +++ b/zenmap/zenmapGUI/MainWindow.py @@ -125,6 +125,11 @@ import gtk import sys import os from os.path import split, isfile, join, abspath, exists + +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + import xml.sax.saxutils from time import time diff --git a/zenmap/zenmapGUI/OptionBuilder.py b/zenmap/zenmapGUI/OptionBuilder.py index 30916595c..ba27b1b92 100644 --- a/zenmap/zenmapGUI/OptionBuilder.py +++ b/zenmap/zenmapGUI/OptionBuilder.py @@ -123,6 +123,11 @@ import gobject import gtk + +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + from xml.dom import minidom from zenmapGUI.higwidgets.higboxes import HIGHBox diff --git a/zenmap/zenmapGUI/ScanInterface.py b/zenmap/zenmapGUI/ScanInterface.py index 84ee4414e..d07e6a1e3 100644 --- a/zenmap/zenmapGUI/ScanInterface.py +++ b/zenmap/zenmapGUI/ScanInterface.py @@ -125,6 +125,11 @@ import gtk import gobject import os import time + +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + import xml.sax from zenmapGUI.higwidgets.hignotebooks import HIGNotebook, HIGAnimatedTabLabel diff --git a/zenmap/zenmapGUI/ScriptInterface.py b/zenmap/zenmapGUI/ScriptInterface.py index 10f9abac1..41be7fb55 100644 --- a/zenmap/zenmapGUI/ScriptInterface.py +++ b/zenmap/zenmapGUI/ScriptInterface.py @@ -125,6 +125,11 @@ import gobject import gtk import sys import tempfile + +# Prevent loading PyXML +import xml +xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] + import xml.sax from zenmapGUI.higwidgets.higwindows import HIGWindow