~facelessuser/beautifulsoup/lxml-fix

« back to all changes in this revision

Viewing changes to bs4/element.py

  • Committer: Isaac Muse
  • Date: 2019-08-14 15:57:46 UTC
  • Revision ID: isaacmuse@gmail.com-20190814155746-2b0s4480bnb24x5g
fix xml breakage with lxml 4.4.0+

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
class NamespacedAttribute(unicode):
47
47
 
48
48
    def __new__(cls, prefix, name, namespace=None):
49
 
        if name is None:
 
49
        if not name:
50
50
            obj = unicode.__new__(cls, prefix)
51
51
        elif prefix is None:
52
52
            # Not really namespaced.