is_picklable: catch AttributeError (addresses #3771) (#4508)

* is_picklable: catch AttributeError (addresses #3771)

* edit

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
This commit is contained in:
Jon Tamir 2020-11-04 12:10:57 -06:00 committed by GitHub
parent 0d1365c442
commit 945d6f5f31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ def is_picklable(obj: object) -> bool:
try:
pickle.dumps(obj)
return True
except pickle.PicklingError:
except (pickle.PicklingError, AttributeError):
return False