diff --git a/certbot-nginx/certbot_nginx/parser.py b/certbot-nginx/certbot_nginx/parser.py index a79136836..b7bfebb32 100644 --- a/certbot-nginx/certbot_nginx/parser.py +++ b/certbot-nginx/certbot_nginx/parser.py @@ -536,7 +536,7 @@ def _comment_directive(block, location): # add_directives next_entry = "\n" if isinstance(next_entry, list): - if COMMENT[-1] in next_entry[-1]: + if "Certbot" in next_entry[-1]: return next_entry = next_entry.spaced[0] block.insert(location + 1, COMMENT[:])