diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/x509.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py index 0c773dac..43ece920 100644 --- a/src/cryptography/x509.py +++ b/src/cryptography/x509.py @@ -176,8 +176,11 @@ class BasicConstraints(object): if path_length is not None and not ca: raise ValueError("path_length must be None when ca is False") - if path_length is not None and (not isinstance(path_length, int) - or path_length < 0): + if ( + path_length is not None and (not isinstance( + path_length, six.integer_types + ) or path_length < 0) + ): raise TypeError( "path_length must be a non-negative integer or None" ) |