diff options
author | Peter Eckersley <pde@eff.org> | 2015-12-17 06:14:54 +0300 |
---|---|---|
committer | Peter Eckersley <pde@eff.org> | 2015-12-17 06:14:54 +0300 |
commit | 64044c9ecae38c22fee8d91c079a0674bd3bedf7 (patch) | |
tree | 168f6d0eaae5bd57edd1a0fe652ad633b83dacb5 /letsencrypt-apache | |
parent | 7affdce9f57dc5a4b05e02b1ef72a68e4bac1163 (diff) |
Failed attempt to log the per-OS apache constant selectionapache-portability
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] |