Cleanup & pydoc

This commit is contained in:
Joona Hoikkala 2015-12-07 12:01:35 +02:00
parent 6e3da9e043
commit 3d9f8c9748
2 changed files with 5 additions and 1 deletions

View file

@ -1087,7 +1087,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
"""
# Always return true for distros without enabled / available
if self.conf("enmod") == None:
return True
return True
enabled_dir = os.path.join(self.parser.root, "sites-enabled")
for entry in os.listdir(enabled_dir):
try:

View file

@ -59,6 +59,10 @@ HEADER_ARGS = {"Strict-Transport-Security": HSTS_ARGS,
"Upgrade-Insecure-Requests": UIR_ARGS}
def os_constant(key):
"""Get a constant value for operating system
:param key: name of cli constant
:return: value of constant for active os
"""
os_info = le_util.get_os_info()
try:
constants = CLI_DEFAULTS[os_info[0].lower()]