diff options
Diffstat (limited to 'letsencrypt-apache')
-rw-r--r-- | letsencrypt-apache/letsencrypt_apache/constants.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/letsencrypt-apache/letsencrypt_apache/constants.py b/letsencrypt-apache/letsencrypt_apache/constants.py index 9eda72b91..4148b1c8c 100644 --- a/letsencrypt-apache/letsencrypt_apache/constants.py +++ b/letsencrypt-apache/letsencrypt_apache/constants.py @@ -1,5 +1,7 @@ """Apache plugin constants.""" +import logging import pkg_resources + from letsencrypt import le_util @@ -84,8 +86,15 @@ def os_constant(key): :return: value of constant for active os """ os_info = le_util.get_os_info() + logger = logging.getLogger(__name__) + print "Got logger", logger + raise ValueError, "bang" try: - constants = CLI_DEFAULTS[os_info[0].lower()] + platform = os_info[0].lower() + constants = CLI_DEFAULTS[platform] + logger.info("Using apache constants for %s", platform) + logger.debug("Constants are %r", constants) except KeyError: + logger.warn("Cannot find Apache metaconfig, falling back to the Debian defaults") constants = CLI_DEFAULTS["debian"] return constants[key] |