Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
c79031b2
Commit
c79031b2
authored
Aug 05, 2013
by
Mukund Sivaraman
Browse files
[master] Fix exception types caught
parent
6674553c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/cmdctl/cmdctl.py.in
View file @
c79031b2
...
...
@@ -604,7 +604,7 @@ class SecureHTTPServer(socketserver_mixin.NoPollMixIn,
self.close_request(sock)
logger.error(CMDCTL_SSL_SETUP_FAILURE_USER_DENIED, err)
raise
except (CmdctlException, IOError) as cce:
except (CmdctlException, IOError
, socket.error
) as cce:
self.close_request(sock)
logger.error(CMDCTL_SSL_SETUP_FAILURE_READING_CERT, cce)
raise
...
...
src/bin/cmdctl/tests/cmdctl_test.py
View file @
c79031b2
...
...
@@ -737,7 +737,7 @@ class TestSecureHTTPServer(unittest.TestCase):
'no_such_file'
,
'no_such_file'
)
# Using a non-certificate file would cause an SSLError
self
.
assertRaises
(
s
sl
.
SSLE
rror
,
self
.
assertRaises
(
s
ocket
.
e
rror
,
self
.
server
.
_wrap_socket_in_ssl_context
,
sock
,
BUILD_FILE_PATH
+
'cmdctl.py'
,
...
...
@@ -756,7 +756,7 @@ class TestSecureHTTPServer(unittest.TestCase):
orig_check_func
=
self
.
server
.
_check_key_and_cert
try
:
self
.
server
.
_check_key_and_cert
=
lambda
x
,
y
:
None
self
.
assertRaises
(
socket
.
e
rror
,
self
.
assertRaises
(
IOE
rror
,
self
.
server
.
_wrap_socket_in_ssl_context
,
sock
,
'no_such_file'
,
'no_such_file'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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