Make objects pickable by removing the _client attribute (#526)

This commit is contained in:
GodSaveTheDoge 2020-10-31 17:06:29 +01:00 committed by GitHub
parent e39ebdec82
commit 028e6ed04a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,3 +95,8 @@ class Object(metaclass=Meta):
def __setitem__(self, key, value):
setattr(self, key, value)
def __getstate__(self):
new_dict = self.__dict__.copy()
new_dict.pop("_client", None)
return new_dict