try:
import xml.etree.ElementTree
from xml.parsers.expat import ExpatError
-except ImportError:
+except (ImportError, SystemError):
msg = ["Please enable python's \"xml\" USE flag in order to use repoman."]
from portage.output import EOutput
out = EOutput()
-# Copyright 2010-2011 Gentoo Foundation
+# Copyright 2010-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
"""Provides an easy-to-use python interface to Gentoo's metadata.xml file.
else:
try:
import xml.etree.cElementTree as etree
- except ImportError:
+ except (ImportError, SystemError):
import xml.etree.ElementTree as etree
try:
from xml.parsers.expat import ExpatError
-except ImportError:
+except (ImportError, SystemError):
ExpatError = SyntaxError
import re
# -*- coding: utf-8 -*-
# repoman: Herd database analysis
-# Copyright 2010-2011 Gentoo Foundation
+# Copyright 2010-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
import errno
import xml.etree.ElementTree
try:
from xml.parsers.expat import ExpatError
-except ImportError:
+except (ImportError, SystemError):
# This means that python is built without xml support.
# We tolerate global scope import failures for optional
# modules, so that ImportModulesTestCase can succeed (or