From b15c8ed354d8460744e52677efb6e5445a9581dc 2018-10-21 22:18:36
From: Matthias Bussonnier <bussonniermatthias@gmail.com>
Date: 2018-10-21 22:18:36
Subject: [PATCH] fix non-existing attribute

---

diff --git a/IPython/sphinxext/ipython_directive.py b/IPython/sphinxext/ipython_directive.py
index 72d3d4f..161530f 100644
--- a/IPython/sphinxext/ipython_directive.py
+++ b/IPython/sphinxext/ipython_directive.py
@@ -579,7 +579,7 @@ class EmbeddedSphinxShell(object):
                                          w.filename, w.lineno, w.line)
                 sys.stdout.write(s)
                 sys.stdout.write('<<<' + ('-' * 73) + '\n')
-                if self.shell.warning_is_error:
+                if self.warning_is_error:
                     raise RuntimeError('Non Expected warning in `{}` line {}'.format(filename, lineno))
 
         self.cout.truncate(0)