[ext/rest] Catch SystemExit raised by docutils stable
authorDenis Laxalde <denis.laxalde@logilab.fr>
Thu, 13 Mar 2014 15:33:22 +0100
branchstable
changeset 9592 6fd2651719bc
parent 9591 5b8bc486d0dc
child 9593 48a84fb4f301
[ext/rest] Catch SystemExit raised by docutils docutils publisher may raise SystemExit which is not caught by Exception. Closes #3648763.
ext/rest.py
--- a/ext/rest.py	Fri Mar 14 15:19:31 2014 +0100
+++ b/ext/rest.py	Thu Mar 13 15:33:22 2014 +0100
@@ -437,7 +437,7 @@
         # necessary for proper garbage collection, else a ref is kept somewhere in docutils...
         del pub.settings.context
         return res
-    except Exception:
+    except BaseException:
         LOGGER.exception('error while publishing ReST text')
         if not isinstance(data, unicode):
             data = unicode(data, encoding, 'replace')