Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
open
certbot-haproxy
Commits
4a51180f
Commit
4a51180f
authored
Sep 09, 2016
by
Maarten de Waard
🤘🏻
Browse files
stage1
parent
52ee2c75
Changes
2
Hide whitespace changes
Inline
Side-by-side
certbot_haproxy/installer.py
View file @
4a51180f
...
...
@@ -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
():
...
...
certbot_haproxy/tests/__init__.py
View file @
4a51180f
"""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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment