Skip to content
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

ssl.py will raise None in certain conditions #127

Closed
denik opened this issue Sep 13, 2012 · 0 comments
Closed

ssl.py will raise None in certain conditions #127

denik opened this issue Sep 13, 2012 · 0 comments
Milestone

Comments

@denik
Copy link
Member

denik commented Sep 13, 2012

I haven't found a solid repro for this, but I get it from time to time when using an TLS/SSL enabled StreamServer.

Traceback (most recent call last):
File "/Users/<snip>/init.py", line 263, in handle
num_read = sock.recv_into(buffer, BUFFER_SIZE)
File "/Library/Python/2.7/site-packages/gevent/ssl.py", line 256, in recv_into
raise
TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType

I'm guessing the reason is that the re-raise is done after sys.exc_clear() in ssl.py:
http://code.google.com/p/gevent/source/browse/gevent/ssl.py#268

What version of the gevent are you using?
0.13.7

On what operating system?
OSX 10.7.3

On what Python?
2.7.1

Please provide any additional information below.

Reported by johan.mjones.


earlier comments

Denis.Bilenko said, at 2012-05-07T21:14:15.000Z:

Indeed, we should not do exc_clear() before raise.

Denis.Bilenko said, at 2012-05-12T11:37:15.000Z:

Fixed in https://bitbucket.org/denis/gevent/changeset/af2e69bd3b2f

@denik denik closed this as completed Sep 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant