diff options
author | Josh Hoyt <josh@janrain.com> | 2006-08-02 23:30:40 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-08-02 23:30:40 +0000 |
commit | f5330f105c131ab6deda2fd4f9074d2ff4c71991 (patch) | |
tree | 189a6b160f800d880c01221aef5ca15add0042c9 /openid/oidutil.py | |
parent | fc7f77068c68ee7e65e623e30e8a6879d9e69e11 (diff) | |
download | openid-f5330f105c131ab6deda2fd4f9074d2ff4c71991.tar.gz |
[project @ Add functionality to consumer.AuthRequest to output a HTML form or just get the dictionary of form values]
Diffstat (limited to 'openid/oidutil.py')
-rw-r--r-- | openid/oidutil.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/openid/oidutil.py b/openid/oidutil.py index 9206b2d..a99d90f 100644 --- a/openid/oidutil.py +++ b/openid/oidutil.py @@ -6,6 +6,23 @@ import urlparse from urllib import urlencode +elementtree_modules = [ + 'lxml.etree', + 'xml.etree.cElementTree', + 'xml.etree.ElementTree', + 'cElementTree', + 'elementtree.ElementTree', + ] + +def importElementTree(): + for mod_name in elementtree_modules: + try: + return __import__(mod_name, None, None, ['unused']) + except ImportError: + pass + else: + raise + def log(message, unused_level=0): sys.stderr.write(message) sys.stderr.write('\n') |