1 |
commit: fea331226ed0d760ab2d0e86650d62dd32230cd6 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 3 17:09:01 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 3 17:09:01 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fea33122 |
7 |
|
8 |
xml/metadata: handle py 3.1 cElementTree incompat |
9 |
|
10 |
This will fix bug #381657. |
11 |
|
12 |
--- |
13 |
pym/portage/xml/metadata.py | 5 +++-- |
14 |
1 files changed, 3 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/pym/portage/xml/metadata.py b/pym/portage/xml/metadata.py |
17 |
index f4b8f2d..04112cd 100644 |
18 |
--- a/pym/portage/xml/metadata.py |
19 |
+++ b/pym/portage/xml/metadata.py |
20 |
@@ -32,9 +32,10 @@ __all__ = ('MetaDataXML',) |
21 |
|
22 |
import sys |
23 |
|
24 |
-if sys.hexversion < 0x2070000: |
25 |
+if sys.hexversion < 0x2070000 or \ |
26 |
+ (sys.hexversion < 0x3020000 and sys.hexversion >= 0x3000000): |
27 |
# Our _MetadataTreeBuilder usage is incompatible with |
28 |
- # cElementTree in Python 2.6: |
29 |
+ # cElementTree in Python 2.6, 3.0, and 3.1: |
30 |
# File "/usr/lib/python2.6/xml/etree/ElementTree.py", line 644, in findall |
31 |
# assert self._root is not None |
32 |
import xml.etree.ElementTree as etree |