stage1
This commit is contained in:
parent
52ee2c7519
commit
4a51180f4d
|
@ -523,7 +523,7 @@ class HAProxyInstaller(common.Plugin):
|
|||
contents = pem.read()
|
||||
if self._cert_key_check(contents, filepath):
|
||||
yield (filepath, filepath, self.conf("haproxy-config"))
|
||||
except IOError, err:
|
||||
except IOError as err:
|
||||
logger.error(
|
||||
"Can't access \"%s\", reason:\n %s",
|
||||
filepath,
|
||||
|
@ -544,7 +544,7 @@ class HAProxyInstaller(common.Plugin):
|
|||
except TypeError:
|
||||
logger.warn("Could not read certificate, wrong type (not PEM)")
|
||||
# Documentation says it raises "Error"
|
||||
except Exception, err: # pylint: disable=broad-except
|
||||
except Exception as err: # pylint: disable=broad-except
|
||||
logger.error("Unexpected error! %s", err)
|
||||
|
||||
if issuer == self.conf('haproxy-ca-common-name') and key.check():
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Certbot HAProxy Tests"""
|
||||
from __future__ import print_function
|
||||
import unittest
|
||||
|
||||
|
||||
|
@ -6,7 +7,7 @@ def load_tests(loader, tests, pattern=None):
|
|||
"""Find all python files in the tests folder"""
|
||||
if pattern is None:
|
||||
pattern = 'test_*.py'
|
||||
print "loader: ", loader
|
||||
print("loader: ", loader)
|
||||
|
||||
suite = loader.discover('certbot_haproxy/tests', pattern=pattern)
|
||||
suite.addTests(tests)
|
||||
|
|
Reference in New Issue