diff options
-rwxr-xr-x | tools/kickstarter | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/tools/kickstarter b/tools/kickstarter index 47a523c..befae7e 100755 --- a/tools/kickstarter +++ b/tools/kickstarter @@ -10,8 +10,26 @@ import time import optparse from time import gmtime, strftime import errno -#import elementtree.ElementTree as etree -from lxml import etree +try: + from lxml import etree +except ImportError: + try: + # Python 2.5 + import xml.etree.cElementTree as etree + except ImportError: + try: + # Python 2.5 + import xml.etree.ElementTree as etree + except ImportError: + try: + # normal cElementTree install + import cElementTree as etree + except ImportError: + try: + # normal ElementTree install + import elementtree.ElementTree as etree + except ImportError: + print("Failed to import ElementTree from any known place") def mkdir_p(path): try: |