New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError in catch exception ssl.SSLerror #73

Closed
hevel opened this Issue Jan 26, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@hevel

hevel commented Jan 26, 2018

  • I'm submitting a bug report

I got traceback error.

cheroot/server.py line 1515, in start
cheroot/server.py line 1590, in tick
cheroot/ssl/builtin.py line 100, in wrap
TypeError: argument of type 'int' is not iterable

builtin.py line 100 code:

elif 'handshake operation timed out' in ex.args[0]:
  • Python version: 2.7.11
  • Cheroot version: 5.8.3
  • CherryPy version: 11.0.0 (if applicable)
  • OS: debian7.7
  • Apache-HttpClient/4.2.1 (java 1.5)
@webknjaz

This comment has been minimized.

Member

webknjaz commented Jan 26, 2018

Could you please trace what value ex.args holds?
And also provide us with the STR.

@calmkart

This comment has been minimized.

calmkart commented Jan 26, 2018

exception ssl.SSLError

Raised to signal an error from the underlying SSL implementation (currently provided by the OpenSSL library). This signifies some problem in the higher-level encryption and authentication layer that’s superimposed on the underlying network connection. This error is a subtype of socket.error, which in turn is a subtype of IOError. The error code and message of SSLError instances are provided by the OpenSSL library.

builtin.py
74 except ssl.SSLError as ex:
....
100 elif 'handshake operation timed out' in ex.args[0]:
ex.args[0] is errorcode(int)
ex.args[1] is error message(str)

100 elif 'handshake operation timed out' in ex.args[1]:

OK.GET IT

@webknjaz

This comment has been minimized.

Member

webknjaz commented Jan 26, 2018

Makes sense, thank you

@webknjaz webknjaz added the bug label Jan 26, 2018

@webknjaz webknjaz closed this in 85edd9c Feb 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment