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"
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||||
xmlns="http://www.w3.org/1999/xhtml"
|
xmlns="http://www.w3.org/1999/xhtml">
|
||||||
exclude-result-prefixes="xhtml">
|
|
||||||
|
|
||||||
<!-- insert search form -->
|
<!-- insert search form -->
|
||||||
<xsl:template match="xhtml:div[@id='sidebar']">
|
<xsl:template match="xhtml:div[@id='sidebar']">
|
||||||
<xsl:copy>
|
<xsl:copy>
|
||||||
<xsl:apply-templates select="@*|node()"/>
|
<xsl:apply-templates select="@*|node()"/>
|
||||||
<xhtml:h2>Search</xhtml:h2>
|
<h2>Search</h2>
|
||||||
<xhtml:form><xhtml:input name="q"/></xhtml:form>
|
<form><input name="q"/></form>
|
||||||
</xsl:copy>
|
</xsl:copy>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
@ -30,7 +29,7 @@
|
|||||||
<xsl:template match="xhtml:head">
|
<xsl:template match="xhtml:head">
|
||||||
<xsl:copy>
|
<xsl:copy>
|
||||||
<xsl:apply-templates select="@*|node()"/>
|
<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:attribute name="href">
|
||||||
<xsl:call-template name="baseuri">
|
<xsl:call-template name="baseuri">
|
||||||
<xsl:with-param name="string">
|
<xsl:with-param name="string">
|
||||||
@ -39,7 +38,7 @@
|
|||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:text>opensearchdescription.xml</xsl:text>
|
<xsl:text>opensearchdescription.xml</xsl:text>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xhtml:link>
|
</link>
|
||||||
</xsl:copy>
|
</xsl:copy>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
@ -17,6 +17,6 @@ class GenshiFilterTests(unittest.TestCase):
|
|||||||
try:
|
try:
|
||||||
import genshi
|
import genshi
|
||||||
except:
|
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):
|
for method in dir(GenshiFilterTests):
|
||||||
if method.startswith('test_'): delattr(GenshiFilterTests,method)
|
if method.startswith('test_'): delattr(GenshiFilterTests,method)
|
||||||
|
@ -28,6 +28,12 @@ try:
|
|||||||
import libxslt
|
import libxslt
|
||||||
except:
|
except:
|
||||||
try:
|
try:
|
||||||
|
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
|
from subprocess import Popen, PIPE
|
||||||
xsltproc=Popen(['xsltproc','--version'],stdout=PIPE,stderr=PIPE)
|
xsltproc=Popen(['xsltproc','--version'],stdout=PIPE,stderr=PIPE)
|
||||||
xsltproc.communicate()
|
xsltproc.communicate()
|
||||||
|
@ -133,14 +133,22 @@ class FilterTests(unittest.TestCase):
|
|||||||
try:
|
try:
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
_no_sed = False
|
_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:
|
try:
|
||||||
sed = Popen(['sed','--version'],stdout=PIPE,stderr=PIPE)
|
sed = Popen(['sed','--version'],stdout=PIPE,stderr=PIPE)
|
||||||
sed.communicate()
|
sed.communicate()
|
||||||
if sed.returncode != 0:
|
if sed.returncode == 0: _no_sed = False
|
||||||
_no_sed = True
|
|
||||||
except WindowsError:
|
except WindowsError:
|
||||||
_no_sed = True
|
pass
|
||||||
|
|
||||||
if _no_sed:
|
if _no_sed:
|
||||||
logger.warn("sed is not available => can't test stripAd_yahoo")
|
logger.warn("sed is not available => can't test stripAd_yahoo")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user