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

DatabaseException: "orig" parameter not provided to the base exception class #13

Closed
trolley813 opened this issue Apr 16, 2018 · 3 comments

Comments

@trolley813
Copy link

At the moment, DatabaseException constructor now looks like this:

class DatabaseException(Exception):
    def __init__(self, orig):
        self.orig = orig
        super(DatabaseException, self).__init__()

It can cause problems when DatabaseException is being thrown from a multiprocessings process (e.g. while working with big data in ClickHouse in parallel), ForkingPickler complaining about the missing orig parameter. So I suggest to add orig into the super constructor, because orig is non-optional:

class DatabaseException(Exception):
    def __init__(self, orig):
        self.orig = orig
        super(DatabaseException, self).__init__(orig)
@jhirniak
Copy link
Contributor

Possible bugfix #36?

@xzkostyan
Copy link
Owner

@jhirniak seems legit. Thanks.

@xzkostyan
Copy link
Owner

Fixed in version 0.0.8.

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

3 participants