From 4cb12b0cca4d7b07b442e61a894490c1107d0f50 Mon Sep 17 00:00:00 2001 From: milde Date: Fri, 30 Mar 2012 07:11:39 +0000 Subject: [PATCH] Apply [ 3512791 ] do not compare string literals with "is". git-svn-id: https://docutils.svn.sourceforge.net/svnroot/docutils/trunk/docutils@7388 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- HISTORY.txt | 1 + docutils/writers/latex2e/__init__.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.txt b/HISTORY.txt index cc756ffb8..69139aefd 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -82,6 +82,7 @@ Changes Since 0.8.1 - Use ``\setcounter{secnumdepth}{0}`` instead of ``*``-versions when suppressing LaTeX section numbering. - Use ``\DUtitle`` for unsupported section levels + - Apply [ 3512791 ] do not compare string literals with "is" * docutils/writers/html4css1/__init__.py diff --git a/docutils/writers/latex2e/__init__.py b/docutils/writers/latex2e/__init__.py index 8e4f55da5..7fa9662c6 100644 --- a/docutils/writers/latex2e/__init__.py +++ b/docutils/writers/latex2e/__init__.py @@ -392,7 +392,7 @@ class Babel(object): self.setup.append( r'\addto\shorthandsspanish{\spanishdeactivate{."~<>}}') # or prepend r'\def\spanishoptions{es-noshorthands}' - if (languages[-1] is 'english' and + if (languages[-1] == 'english' and 'french' in self.otherlanguages.keys()): self.setup += ['% Prevent side-effects if French hyphenation ' 'patterns are not loaded:', -- 2.11.4.GIT