Browse Source

Werkzeug version imported in the global scope, rather than within the function

pull/2825/head
Dilan Coss 7 years ago
parent
commit
e2fe26218d
  1. 2
      flask/cli.py

2
flask/cli.py

@ -21,6 +21,7 @@ import traceback
from functools import update_wrapper
from operator import attrgetter
from threading import Lock, Thread
from werkzeug import __version__ as werkzeug_version
import click
from werkzeug.utils import import_string
@ -257,7 +258,6 @@ def locate_app(script_info, module_name, app_name, raise_if_not_found=True):
def get_version(ctx, param, value):
from werkzeug import __version__ as werkzeug_version
if not value or ctx.resilient_parsing:
return
message = 'Python %(python_version)s\nFlask %(version)s\nWerkzeug %(werkzeug_version)s'

Loading…
Cancel
Save