[ReST] settings update: add traceback=True to avoid sys.exit, and set stylesheet to None since we don't care about it and that may makes docutils stupidly fail according to the cwd at import time... stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 16 Sep 2010 18:43:03 +0200
branchstable
changeset 6275 20f30e01ae59
parent 6274 72bf3ec4068b
child 6276 cb4a48b2250e
[ReST] settings update: add traceback=True to avoid sys.exit, and set stylesheet to None since we don't care about it and that may makes docutils stupidly fail according to the cwd at import time...
ext/rest.py
--- a/ext/rest.py	Thu Sep 16 18:41:45 2010 +0200
+++ b/ext/rest.py	Thu Sep 16 18:43:03 2010 +0200
@@ -242,8 +242,14 @@
         data = data.translate(ESC_CAR_TABLE)
     settings = {'input_encoding': encoding, 'output_encoding': 'unicode',
                 'warning_stream': StringIO(),
+                'traceback': True, # don't sys.exit
+                'stylesheet': None, # don't try to embed stylesheet (may cause
+                                    # obscure bug due to docutils computing
+                                    # relative path according to the directory
+                                    # used *at import time*
                 # dunno what's the max, severe is 4, and we never want a crash
-                # (though try/except may be a better option...)
+                # (though try/except may be a better option...). May be the
+                # above traceback option will avoid this?
                 'halt_level': 10,
                 }
     if context: