public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: pym/repoman/, bin/, pym/portage/xml/
@ 2012-04-14  2:47 Zac Medico
  0 siblings, 0 replies; only message in thread
From: Zac Medico @ 2012-04-14  2:47 UTC (permalink / raw
  To: gentoo-commits

commit:     4fd43df42a9705bdb7681f4d67fb49b8da24a5d9
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 14 02:47:13 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Apr 14 02:47:13 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4fd43df4

Handle SystemError when importing xml libraries.

---
 bin/repoman                 |    2 +-
 pym/portage/xml/metadata.py |    6 +++---
 pym/repoman/herdbase.py     |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index 076d404..4253924 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -45,7 +45,7 @@ portage.dep._internal_warnings = True
 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()

diff --git a/pym/portage/xml/metadata.py b/pym/portage/xml/metadata.py
index bed6a1e..25f801a 100644
--- a/pym/portage/xml/metadata.py
+++ b/pym/portage/xml/metadata.py
@@ -1,4 +1,4 @@
-# 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.
@@ -42,12 +42,12 @@ if sys.hexversion < 0x2070000 or \
 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

diff --git a/pym/repoman/herdbase.py b/pym/repoman/herdbase.py
index 8ce36a7..91a32cb 100644
--- a/pym/repoman/herdbase.py
+++ b/pym/repoman/herdbase.py
@@ -1,13 +1,13 @@
 # -*- 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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-14  2:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-14  2:47 [gentoo-commits] proj/portage:master commit in: pym/repoman/, bin/, pym/portage/xml/ Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox