From 5b7fd9ad889e54d4d694d310b559c921d7df75cf Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Thu, 16 Mar 2017 14:37:58 +0100 Subject: [PATCH] Print a stacktrace on CLI error (closes #2208) --- flask/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flask/cli.py b/flask/cli.py index bde5a13b..8f8fac03 100644 --- a/flask/cli.py +++ b/flask/cli.py @@ -11,6 +11,7 @@ import os import sys +import traceback from threading import Lock, Thread from functools import update_wrapper @@ -368,6 +369,9 @@ class FlaskGroup(AppGroup): # want the help page to break if the app does not exist. # If someone attempts to use the command we try to create # the app again and this will give us the error. + # However, we will not do so silently because that would confuse + # users. + traceback.print_exc() pass return sorted(rv)