|
|
@ -670,7 +670,7 @@ class CertParamType(click.ParamType): |
|
|
|
|
|
|
|
|
|
|
|
obj = import_string(value, silent=True) |
|
|
|
obj = import_string(value, silent=True) |
|
|
|
|
|
|
|
|
|
|
|
if sys.version_info < (2, 7): |
|
|
|
if sys.version_info < (2, 7, 9): |
|
|
|
if obj: |
|
|
|
if obj: |
|
|
|
return obj |
|
|
|
return obj |
|
|
|
else: |
|
|
|
else: |
|
|
@ -687,7 +687,7 @@ def _validate_key(ctx, param, value): |
|
|
|
cert = ctx.params.get('cert') |
|
|
|
cert = ctx.params.get('cert') |
|
|
|
is_adhoc = cert == 'adhoc' |
|
|
|
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)) |
|
|
|
is_context = cert and not isinstance(cert, (text_type, bytes)) |
|
|
|
else: |
|
|
|
else: |
|
|
|
is_context = isinstance(cert, ssl.SSLContext) |
|
|
|
is_context = isinstance(cert, ssl.SSLContext) |
|
|
|