hgmanpage: adapt to Docutils 0.8 API change
authorSatish Balay <balay@fastmail.fm>
Thu, 16 Jun 2011 19:34:42 +0200
changeset 14633 cdda48c93676
parent 14632 4819241ec1ad
child 14634 1679d73c9464
hgmanpage: adapt to Docutils 0.8 API change
doc/hgmanpage.py
--- a/doc/hgmanpage.py	Thu Jun 16 08:49:26 2011 +0200
+++ b/doc/hgmanpage.py	Thu Jun 16 19:34:42 2011 +0200
@@ -48,6 +48,7 @@
 
 from docutils import nodes, writers, languages
 import roman
+import inspect
 
 FIELD_LIST_INDENT = 7
 DEFINITION_LIST_INDENT = 7
@@ -160,7 +161,12 @@
         nodes.NodeVisitor.__init__(self, document)
         self.settings = settings = document.settings
         lcode = settings.language_code
-        self.language = languages.get_language(lcode)
+        arglen = len(inspect.getargspec(languages.get_language)[0])
+        if arglen == 2:
+            self.language = languages.get_language(lcode,
+                                                   self.document.reporter)
+        else:
+            self.language = languages.get_language(lcode)
         self.head = []
         self.body = []
         self.foot = []