diff options
author | Leonard Richardson <leonardr@segfault.org> | 2019-10-05 16:24:19 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2019-10-05 16:24:19 -0400 |
commit | 24fca77a9e156ec77f1bec115199c9be176edcc2 (patch) | |
tree | d3927bd7cb95a0e4f0939c78e9ec1628577a02d9 /bs4/element.py | |
parent | ab0626db2a60f4f22b97ece310d92038b3da5cc1 (diff) |
Avoid a crash when unpickling certain parse trees generated using html5lib on Python 3. [bug=1843545]
Diffstat (limited to 'bs4/element.py')
-rw-r--r-- | bs4/element.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bs4/element.py b/bs4/element.py index d6ed020..2001ad5 100644 --- a/bs4/element.py +++ b/bs4/element.py @@ -45,7 +45,7 @@ def _alias(attr): class NamespacedAttribute(unicode): - def __new__(cls, prefix, name, namespace=None): + def __new__(cls, prefix, name=None, namespace=None): if not name: # This is the default namespace. Its name "has no value" # per https://www.w3.org/TR/xml-names/#defaulting |