summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-01-05 18:06:08 +0100
committerGeorg Brandl <georg@python.org>2011-01-05 18:06:08 +0100
commit668ae270caa01838a045291871334fe94b42bb07 (patch)
treea207073bdc280f675cccfa56de3b0ec53bc7eb6b
parentac637502d2832076471752d59d9de69e31566ba6 (diff)
downloadsphinx-668ae270caa01838a045291871334fe94b42bb07.tar.gz
Adapt to refactoring of Babel class in latest docutils.
-rw-r--r--sphinx/writers/latex.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py
index a89bb638..c6df5c89 100644
--- a/sphinx/writers/latex.py
+++ b/sphinx/writers/latex.py
@@ -102,8 +102,10 @@ class ExtBabel(Babel):
return '\\shorthandoff{"}'
return ''
- _ISO639_TO_BABEL = Babel._ISO639_TO_BABEL.copy()
- _ISO639_TO_BABEL['sl'] = 'slovene'
+# in latest trunk, the attribute is called Babel.language_codes and already
+# includes Slovene
+if hasattr(Babel, '_ISO639_TO_BABEL'):
+ Babel._ISO639_TO_BABEL['sl'] = 'slovene'
class Table(object):