Fixed items noticed during the upgrade to Feisty
* dependency on non-spec compliant feature of xsltproc * workaround Python 2.5 regression (bug 1704790) * make Genshi message initial-caps
This commit is contained in:
parent
4109e1ac17
commit
f8cdb907a8
@ -1,14 +1,13 @@
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
exclude-result-prefixes="xhtml">
|
||||
xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<!-- insert search form -->
|
||||
<xsl:template match="xhtml:div[@id='sidebar']">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()"/>
|
||||
<xhtml:h2>Search</xhtml:h2>
|
||||
<xhtml:form><xhtml:input name="q"/></xhtml:form>
|
||||
<h2>Search</h2>
|
||||
<form><input name="q"/></form>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
@ -30,7 +29,7 @@
|
||||
<xsl:template match="xhtml:head">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()"/>
|
||||
<xhtml:link rel="search" type="application/opensearchdescription+xml" title="{xhtml:link[@rel='alternate']/@title} search">
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="{xhtml:link[@rel='alternate']/@title} search">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="baseuri">
|
||||
<xsl:with-param name="string">
|
||||
@ -39,7 +38,7 @@
|
||||
</xsl:call-template>
|
||||
<xsl:text>opensearchdescription.xml</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xhtml:link>
|
||||
</link>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
|
@ -17,6 +17,6 @@ class GenshiFilterTests(unittest.TestCase):
|
||||
try:
|
||||
import genshi
|
||||
except:
|
||||
logger.warn("genshi is not available => can't test genshi filters")
|
||||
logger.warn("Genshi is not available => can't test genshi filters")
|
||||
for method in dir(GenshiFilterTests):
|
||||
if method.startswith('test_'): delattr(GenshiFilterTests,method)
|
||||
|
@ -28,10 +28,16 @@ try:
|
||||
import libxslt
|
||||
except:
|
||||
try:
|
||||
from subprocess import Popen, PIPE
|
||||
xsltproc=Popen(['xsltproc','--version'],stdout=PIPE,stderr=PIPE)
|
||||
xsltproc.communicate()
|
||||
if xsltproc.returncode != 0: raise ImportError
|
||||
try:
|
||||
# Python 2.5 bug 1704790 workaround (alas, Unix only)
|
||||
import commands
|
||||
if commands.getstatusoutput('xsltproc --version')[0] != 0:
|
||||
raise ImportError
|
||||
except:
|
||||
from subprocess import Popen, PIPE
|
||||
xsltproc=Popen(['xsltproc','--version'],stdout=PIPE,stderr=PIPE)
|
||||
xsltproc.communicate()
|
||||
if xsltproc.returncode != 0: raise ImportError
|
||||
except:
|
||||
logger.warn("libxslt is not available => can't test xslt filters")
|
||||
del XsltFilterTests.test_xslt_filter
|
||||
|
@ -133,14 +133,22 @@ class FilterTests(unittest.TestCase):
|
||||
try:
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
_no_sed = False
|
||||
try:
|
||||
sed = Popen(['sed','--version'],stdout=PIPE,stderr=PIPE)
|
||||
sed.communicate()
|
||||
if sed.returncode != 0:
|
||||
_no_sed = True
|
||||
except WindowsError:
|
||||
_no_sed = True
|
||||
_no_sed = True
|
||||
if _no_sed:
|
||||
try:
|
||||
# Python 2.5 bug 1704790 workaround (alas, Unix only)
|
||||
import commands
|
||||
if commands.getstatusoutput('sed --version')[0]==0: _no_sed = False
|
||||
except:
|
||||
pass
|
||||
|
||||
if _no_sed:
|
||||
try:
|
||||
sed = Popen(['sed','--version'],stdout=PIPE,stderr=PIPE)
|
||||
sed.communicate()
|
||||
if sed.returncode == 0: _no_sed = False
|
||||
except WindowsError:
|
||||
pass
|
||||
|
||||
if _no_sed:
|
||||
logger.warn("sed is not available => can't test stripAd_yahoo")
|
||||
|
Loading…
Reference in New Issue
Block a user