[rest] cleanup, avoid deprecation warning
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 03 Mar 2010 18:33:56 +0100
changeset 4769 5b878b02b67b
parent 4768 430b89aed996
child 4770 860c4128236c
[rest] cleanup, avoid deprecation warning
ext/rest.py
--- a/ext/rest.py	Wed Mar 03 18:32:21 2010 +0100
+++ b/ext/rest.py	Wed Mar 03 18:33:56 2010 +0100
@@ -92,14 +92,15 @@
     in `docutils.parsers.rst.directives.misc`
     """
     context = state.document.settings.context
+    cw = context._cw
     source = state_machine.input_lines.source(
         lineno - state_machine.input_offset - 1)
     #source_dir = os.path.dirname(os.path.abspath(source))
     fid = arguments[0]
-    for lang in chain((context._cw.lang, context.vreg.property_value('ui.language')),
-                      context.config.available_languages()):
+    for lang in chain((cw.lang, cw.vreg.property_value('ui.language')),
+                      cw.vreg.config.available_languages()):
         rid = '%s_%s.rst' % (fid, lang)
-        resourcedir = context.config.locate_doc_file(rid)
+        resourcedir = cw.vreg.config.locate_doc_file(rid)
         if resourcedir:
             break
     else: