summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Wagner <rwagner@mythtv.org>2011-02-08 15:23:47 (GMT)
committer Raymond Wagner <rwagner@mythtv.org>2011-02-08 15:23:47 (GMT)
commit2ae46c506170aa7c531cbda2d51feb4185fb953e (patch)
tree1c2ed7a0a658d5eed8cf4e1046ef898813913104
parent1d3ca2161d5bd97e960304b8d60cf28f86c28a29 (diff)
Replace 'xml' version check with one that checks Python version, for
Python 2.7 compatibility.
-rwxr-xr-xmythplugins/mythvideo/mythvideo/scripts/jamu.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/mythplugins/mythvideo/mythvideo/scripts/jamu.py b/mythplugins/mythvideo/mythvideo/scripts/jamu.py
index eeeeef0..af75660 100755
--- a/mythplugins/mythvideo/mythvideo/scripts/jamu.py
+++ b/mythplugins/mythvideo/mythvideo/scripts/jamu.py
@@ -308,6 +308,7 @@ __version__=u"v0.7.9"
# 0.7.7 Pull hostname from python bindings instead of socket libraries
# 0.7.8 Replace uses of MythVideo.getVideo()
# 0.7.9 Deal with jamu.conf entries that have unicode characters
+ # Replace 'xml' module version check with generic Python version, to correct failure in Python 2.7
usage_txt=u'''
@@ -478,14 +479,10 @@ class OutStreamEncoder(object):
sys.stdout = OutStreamEncoder(sys.stdout, 'utf8')
sys.stderr = OutStreamEncoder(sys.stderr, 'utf8')
-try:
- import xml
-except Exception, e:
- print '''The python module xml must be installed. error(%s)''' % e
+if sys.version_info <= (2,5):
+ print '''JAMU requires Python 2.5 or newer to run.'''
sys.exit(1)
-if xml.__version__ < u'41660':
- print '''
-\n! Warning - The module xml (v41660 or greater) must be installed. Your version is different (v%s) than what Jamu was tested with. Jamu may not work on your installation.\nIt is recommended that you upgrade.\n''' % xml.__version__
+
import xml.etree.cElementTree as ElementTree