diff options
Diffstat (limited to 'bs4/__init__.py')
-rw-r--r-- | bs4/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bs4/__init__.py b/bs4/__init__.py index ddf1a86..75c801c 100644 --- a/bs4/__init__.py +++ b/bs4/__init__.py @@ -396,7 +396,7 @@ class BeautifulSoup(Tag): def __getstate__(self): # Frequently a tree builder can't be pickled. d = dict(self.__dict__) - if 'builder' in d and not self.builder.picklable: + if 'builder' in d and d['builder'] is not None and not self.builder.picklable: d['builder'] = None return d |