changeset 3540:7bf83cd8da79

offer the RSS feed not only when we detect PyXML, but also for Python >= 2.5.1
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 27 Apr 2008 00:48:03 +0200
parents 17d11e11daf2
children 8ff53b14fc44
files MoinMoin/theme/__init__.py
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/theme/__init__.py	Sat Apr 26 23:44:30 2008 +0200
+++ b/MoinMoin/theme/__init__.py	Sun Apr 27 00:48:03 2008 +0200
@@ -2,7 +2,7 @@
 """
     MoinMoin - Theme Package
 
-    @copyright: 2003-2007 MoinMoin:ThomasWaldmann
+    @copyright: 2003-2008 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
 
@@ -12,10 +12,11 @@
 
 modules = pysupport.getPackageModules(__file__)
 
-# Check whether we can emit a RSS feed (code stolen from wikitest.py).
-# Currently RSS is broken on plain Python, and works only when installing PyXML.
-import xml
-rss_supported = '_xmlplus' in xml.__file__
+# Check whether we can emit a RSS feed.
+# RSS is broken on plain Python 2.3.x/2.4.x, and works only when installing PyXML.
+# News: A user reported that the RSS is valid when using Python 2.5.1 on Windows.
+import sys, xml
+rss_supported = sys.version_info[:3] >= (2, 5, 1) or '_xmlplus' in xml.__file__
 
 
 class ThemeBase: