mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 16:22:18 -04:00
ApacheConfigurator.is_enabled using filecmp (fixes #838).
This commit is contained in:
parent
013d5d2ea9
commit
5edd809161
1 changed files with 6 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
|||
"""Apache Configuration based off of Augeas Configurator."""
|
||||
# pylint: disable=too-many-lines
|
||||
import filecmp
|
||||
import itertools
|
||||
import logging
|
||||
import os
|
||||
|
|
@ -945,9 +946,11 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
|||
"""
|
||||
enabled_dir = os.path.join(self.parser.root, "sites-enabled")
|
||||
for entry in os.listdir(enabled_dir):
|
||||
if os.path.realpath(os.path.join(enabled_dir, entry)) == avail_fp:
|
||||
return True
|
||||
|
||||
try:
|
||||
if filecmp.cmp(avail_fp, os.path.join(enabled_dir, entry)):
|
||||
return True
|
||||
except OSError:
|
||||
pass
|
||||
return False
|
||||
|
||||
def enable_site(self, vhost):
|
||||
|
|
|
|||
Loading…
Reference in a new issue