Browse Source

Update cli.py

SSLContext was introduced in 2.7.9.
pull/2797/head
dayiguizhen 7 years ago committed by GitHub
parent
commit
be6173757d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      flask/cli.py

2
flask/cli.py

@ -687,7 +687,7 @@ def _validate_key(ctx, param, value):
cert = ctx.params.get('cert')
is_adhoc = cert == 'adhoc'
if sys.version_info < (2, 7):
if sys.version_info < (2, 7, 9):
is_context = cert and not isinstance(cert, (text_type, bytes))
else:
is_context = isinstance(cert, ssl.SSLContext)

Loading…
Cancel
Save