From 0417d00d9ff1e19bc3ab67d39bdd18e1674768c1 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 29 Apr 2017 10:00:24 -0400 Subject: Don't compare cffi version using strings (#3524) --- src/cryptography/hazmat/primitives/ciphers/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cryptography/hazmat/primitives/ciphers') diff --git a/src/cryptography/hazmat/primitives/ciphers/base.py b/src/cryptography/hazmat/primitives/ciphers/base.py index 502d9804..e9d55a10 100644 --- a/src/cryptography/hazmat/primitives/ciphers/base.py +++ b/src/cryptography/hazmat/primitives/ciphers/base.py @@ -147,7 +147,7 @@ class _CipherContext(object): # cffi 1.7 supports from_buffer on bytearray, which is required. We can # remove this check in the future when we raise our minimum PyPy version. - if utils._version_check(cffi.__version__, "1.7"): + if cffi.__version_info__ >= (1, 7): def update_into(self, data, buf): if self._ctx is None: raise AlreadyFinalized("Context was already finalized.") @@ -195,7 +195,7 @@ class _AEADCipherContext(object): # cffi 1.7 supports from_buffer on bytearray, which is required. We can # remove this check in the future when we raise our minimum PyPy version. - if utils._version_check(cffi.__version__, "1.7"): + if cffi.__version_info__ >= (1, 7): def update_into(self, data, buf): self._check_limit(len(data)) return self._ctx.update_into(data, buf) -- cgit v1.2.3