Skip to content

Commit

Permalink
Use tagname property from object, not class. Fixes #89
Browse files Browse the repository at this point in the history
  • Loading branch information
Knio committed Feb 28, 2020
1 parent a9da190 commit 4cb6221
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dominate/dom_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,7 @@ def render(self, indent=' ', pretty=True, xhtml=False):
def _render(self, sb, indent_level, indent_str, pretty, xhtml):
pretty = pretty and self.is_pretty

t = type(self)
name = getattr(t, 'tagname', t.__name__)
name = getattr(self, 'tagname', type(self).__name__)

# Workaround for python keywords and standard classes/methods
# (del, object, input)
Expand Down

0 comments on commit 4cb6221

Please sign in to comment.