Author: duncan
Date: Wed Jun 6 17:13:21 2007
New Revision: 9659
Modified:
branches/rel-1/freevo/ChangeLog
branches/rel-1/freevo/setup.py
branches/rel-1/freevo/src/tv/xmltv.py
Log:
[ 1731775 ] ElementTree moved to standard library in Python 2.5+
Patch from James Oakley applied
Modified: branches/rel-1/freevo/ChangeLog
==============================================================================
--- branches/rel-1/freevo/ChangeLog (original)
+++ branches/rel-1/freevo/ChangeLog Wed Jun 6 17:13:21 2007
@@ -22,6 +22,7 @@
* Updated system sensors for a configurable path (B#1731892)
* Updated xine video plug-in to allow bookmarks to work (F#1729024)
* Updated xine video plug-in to process stdout and stderr message (F#1729603)
+ * Updated xmltv's use of element tree for Python-2.5 (F#1731775)
* Fixed audio channel selection for AVI files, when no id is present
(B#1731232)
* Fixed CD cover image search because of changes to Amazon developer services
(B#1731835)
* Fixed fxd parser's setattr not working correctly in all cases (B#1728421)
Modified: branches/rel-1/freevo/setup.py
==============================================================================
--- branches/rel-1/freevo/setup.py (original)
+++ branches/rel-1/freevo/setup.py Wed Jun 6 17:13:21 2007
@@ -16,18 +16,22 @@
from distutils import core
-check_libs((
- ('xml.utils.qp_xml', 'http://pyxml.sourceforge.net/'),
- ('kaa', '\"svn co svn://svn.freevo.org/kaa/trunk/ kaa\"' ),
- ('kaa.metadata', '\"svn co svn://svn.freevo.org/kaa/trunk/ kaa\"'
),
- ('kaa.imlib2', '\"svn co svn://svn.freevo.org/kaa/trunk/ kaa\"' ),
- ('BeautifulSoup', 'http://www.crummy.com/software/BeautifulSoup/'
),
- ('pygame', 'http://www.pygame.org'),
- ('Image', 'http://www.pythonware.com/products/pil/'),
- ('elementtree', 'http://effbot.org/zone/elementtree.htm'),
- ('twisted', 'http://www.twistedmatrix.com/'),
- ('twisted.web.microdom', 'http://www.twistedmatrix.com/')
-))
+libs_to_check = [
+ ('xml.utils.qp_xml', 'http://pyxml.sourceforge.net/'),
+ ('kaa', '\"svn co svn://svn.freevo.org/kaa/trunk/ kaa\"' ),
+ ('kaa.metadata', '\"svn co svn://svn.freevo.org/kaa/trunk/ kaa\"' ),
+ ('kaa.imlib2', '\"svn co svn://svn.freevo.org/kaa/trunk/ kaa\"' ),
+ ('BeautifulSoup', 'http://www.crummy.com/software/BeautifulSoup/' ),
+ ('pygame', 'http://www.pygame.org'),
+ ('Image', 'http://www.pythonware.com/products/pil/'),
+ ('twisted', 'http://www.twistedmatrix.com/'),
+ ('twisted.web.microdom', 'http://www.twistedmatrix.com/'),
+]
+
+if sys.hexversion < 0x2050000:
+ libs_to_check.append(('elementtree',
'http://effbot.org/zone/elementtree.htm'))
+
+check_libs(libs_to_check)
class Runtime(core.Command):
Modified: branches/rel-1/freevo/src/tv/xmltv.py
==============================================================================
--- branches/rel-1/freevo/src/tv/xmltv.py (original)
+++ branches/rel-1/freevo/src/tv/xmltv.py Wed Jun 6 17:13:21 2007
@@ -30,10 +30,15 @@
# If you have any trouble: [EMAIL PROTECTED]
#
import types, re
-try:
- from cElementTree import ElementTree, Element, SubElement, tostring
-except ImportError:
- from elementtree.ElementTree import ElementTree, Element, SubElement,
tostring
+import sys
+
+if sys.hexversion >= 0x2050000:
+ from xml.etree.cElementTree import ElementTree, Element, SubElement,
tostring
+else:
+ try:
+ from cElementTree import ElementTree, Element, SubElement, tostring
+ except ImportError:
+ from elementtree.ElementTree import ElementTree, Element, SubElement,
tostring
# The Python-XMLTV version
VERSION = "1.2"
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog