mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 00:35:03 +02:00
Replacing magic constant
This commit is contained in:
@@ -241,4 +241,6 @@ def get_sans_from_cert(pem):
|
||||
ext = x509.get_ext("subjectAltName")
|
||||
except LookupError:
|
||||
return []
|
||||
return [x[4:] for x in ext.get_value().split(", ") if x.startswith("DNS:")]
|
||||
prefix = "DNS:"
|
||||
return [x[len(prefix):] for x in ext.get_value().split(", ")
|
||||
if x.startswith(prefix)]
|
||||
|
||||
Reference in New Issue
Block a user