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

Allow exception pickling. #959

Merged
merged 1 commit into from
Jan 30, 2017
Merged

Allow exception pickling. #959

merged 1 commit into from
Jan 30, 2017

Conversation

bolaum
Copy link
Contributor

@bolaum bolaum commented Jan 30, 2017

This fixes exception pickling. The error can be reproduced with the following code:

>>> import pickle
>>> import psutil
>>>
>>> pkexc = pickle.dumps(psutil.NoSuchProcess(123))
>>> e = pickle.loads(pkexc)
Traceback (most recent call last):
...
TypeError: __init__() takes at least 2 arguments (1 given)

Calling the base class constructor fixed it.

@giampaolo
Copy link
Owner

Nice one, thanks

@giampaolo giampaolo merged commit 6a545cf into giampaolo:master Jan 30, 2017
@bolaum
Copy link
Contributor Author

bolaum commented Jan 30, 2017

Wow! This was impressively fast 👍

giampaolo added a commit that referenced this pull request Jan 30, 2017
@giampaolo giampaolo added the bug label Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants