mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-28 09:39:53 +00:00
cert_audit: Fix bug in check_cryptography_version
check_cryptography_version didn't provide helpful message with Python < 3.6, because re.Match object is not subscriptable. Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
This commit is contained in:
parent
0b4832bbf5
commit
fd72d9f556
@ -45,7 +45,7 @@ from mbedtls_dev import build_tree
|
||||
|
||||
def check_cryptography_version():
|
||||
match = re.match(r'^[0-9]+', cryptography.__version__)
|
||||
if match is None or int(match[0]) < 35:
|
||||
if match is None or int(match.group(0)) < 35:
|
||||
raise Exception("audit-validity-dates requires cryptography >= 35.0.0"
|
||||
+ "({} is too old)".format(cryptography.__version__))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user