mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 11:51:10 +00:00
Fix for pickling exception when deserializing GithubException.
See: https://bugs.python.org/issue9400 "Because CalledProcessError extends PyExc_BaseException, which defines a __reduce__ method, that special method cause the pickle load to call the exception type's __init__ method with packed self.args as arguments. So if a subclass of "Exception" needs to behave correctly in pickling, it should make self.args meet its __init__ method's function signature. "
This commit is contained in:
@@ -36,6 +36,7 @@ class GithubException(Exception):
|
||||
Exception.__init__(self)
|
||||
self.__status = status
|
||||
self.__data = data
|
||||
self.args = [status, data]
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
|
||||
Reference in New Issue
Block a user