diff options
Diffstat (limited to 'gentoo-scripts')
-rw-r--r-- | gentoo-scripts/herds.py | 5 | ||||
-rw-r--r-- | gentoo-scripts/maintainer.py | 5 | ||||
-rw-r--r-- | gentoo-scripts/metadata.py | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/gentoo-scripts/herds.py b/gentoo-scripts/herds.py index 8775af7..6649062 100644 --- a/gentoo-scripts/herds.py +++ b/gentoo-scripts/herds.py @@ -7,10 +7,13 @@ cache_max_age = 100 # python, pyxml import sys, string, os -import cElementTree as elementtree import urllib2 import os import time +try: + import cElementTree as etree +except ImportError: + import xml.etree.cElementTree as etree if len(sys.argv) < 2: print "usage: herds.py herdname" diff --git a/gentoo-scripts/maintainer.py b/gentoo-scripts/maintainer.py index 5e637dc..1172591 100644 --- a/gentoo-scripts/maintainer.py +++ b/gentoo-scripts/maintainer.py @@ -21,7 +21,10 @@ sys.stderr = stderr from stat import * from output import * -import cElementTree as etree +try: + import cElementTree as etree +except ImportError: + import xml.etree.cElementTree as etree nocolor() diff --git a/gentoo-scripts/metadata.py b/gentoo-scripts/metadata.py index e6785d5..8b7f974 100644 --- a/gentoo-scripts/metadata.py +++ b/gentoo-scripts/metadata.py @@ -22,7 +22,10 @@ sys.stderr = stderr from stat import * from portage.output import * -import cElementTree as etree +try: + import cElementTree as etree +except ImportError: + import xml.etree.cElementTree as etree nocolor() |