Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replace 'xml' version check with one that checks Python version, for

Python 2.7 compatibility.
  • Loading branch information...
commit 2ae46c506170aa7c531cbda2d51feb4185fb953e 1 parent 1d3ca21
@wagnerrp wagnerrp authored
Showing with 4 additions and 7 deletions.
  1. +4 −7 mythplugins/mythvideo/mythvideo/scripts/jamu.py
View
11 mythplugins/mythvideo/mythvideo/scripts/jamu.py
@@ -308,6 +308,7 @@
# 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 @@ def __getattr__(self, attr):
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
Please sign in to comment.
Something went wrong with that request. Please try again.