diff options
Diffstat (limited to 'youtube/__init__.py')
-rw-r--r-- | youtube/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube/__init__.py b/youtube/__init__.py index 9a5f66c..08f4f6f 100644 --- a/youtube/__init__.py +++ b/youtube/__init__.py @@ -108,6 +108,12 @@ def error_page(e): if exc_info()[1].ip: error_message += '\n\nExit node IP address: ' + exc_info()[1].ip return flask.render_template('error.html', error_message=error_message, slim=slim), 502 + elif exc_info()[0] == util.FetchError and exc_info()[1].error_message: + return (flask.render_template( + 'error.html', + error_message=exc_info()[1].error_message, + slim=slim + ), 502) return flask.render_template('error.html', traceback=traceback.format_exc(), slim=slim), 500 |