From 283042c675e4c641dbaf0c40ad872f0d7a2cec87 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Sun, 4 Dec 2016 14:33:39 +0000 Subject: [PATCH] Ensure variable is set if exc_info is falsey Closes gh-1940 --- notebook/base/handlers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/notebook/base/handlers.py b/notebook/base/handlers.py index dcabc4cb3..4a081afac 100755 --- a/notebook/base/handlers.py +++ b/notebook/base/handlers.py @@ -359,6 +359,7 @@ class IPythonHandler(AuthenticatedHandler): exc_info = kwargs.get('exc_info') message = '' status_message = responses.get(status_code, 'Unknown HTTP Error') + exception = '(unknown)' if exc_info: exception = exc_info[1] # get the custom message, if defined