mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 03:02:15 +02:00
More correct parsing of lines containing trailing space
This commit is contained in:
@@ -131,7 +131,7 @@ def _get_names(config):
|
|||||||
for this_file in files:
|
for this_file in files:
|
||||||
for line in open(os.path.join(root, this_file)):
|
for line in open(os.path.join(root, this_file)):
|
||||||
if line.strip().startswith("server_name"):
|
if line.strip().startswith("server_name"):
|
||||||
names = line.partition("server_name")[2].rstrip(";")
|
names = line.partition("server_name")[2].rpartition(";")[0]
|
||||||
[all_names.add(n) for n in names.split()]
|
[all_names.add(n) for n in names.split()]
|
||||||
non_ip_names = set(n for n in all_names if not util.IP_REGEX.match(n))
|
non_ip_names = set(n for n in all_names if not util.IP_REGEX.match(n))
|
||||||
return all_names, non_ip_names
|
return all_names, non_ip_names
|
||||||
|
|||||||
Reference in New Issue
Block a user