mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 16:12:09 +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")
|
ext = x509.get_ext("subjectAltName")
|
||||||
except LookupError:
|
except LookupError:
|
||||||
return []
|
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