Skip to content

Commit

Permalink
Remove unreachable code in HTML.table()
Browse files Browse the repository at this point in the history
There is only one class that defines getAlign, and it's unconditional.
It's also the same only class that defines getType and getSpan. These
don't seem to be used dynamically in any way.
  • Loading branch information
jamadden committed Aug 24, 2017
1 parent 32d453b commit 85c144f
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/zope/structuredtext/html.py
Expand Up @@ -237,22 +237,16 @@ def table(self, doc, level, output):
for row in doc.getRows()[0]:
output("<tr>\n")
for column in row.getColumns()[0]:
if hasattr(column, "getAlign"):
str = ('<%s colspan="%s" align="%s" valign="%s">'
% (column.getType(),
column.getSpan(),
column.getAlign(),
column.getValign()))
else:
str = '<td colspan="%s">' % column.getSpan()
str = ('<%s colspan="%s" align="%s" valign="%s">'
% (column.getType(),
column.getSpan(),
column.getAlign(),
column.getValign()))
output(str)
for c in column.getChildNodes():
getattr(self, self.element_types[c.getNodeName()]
)(c, level, output)
if hasattr(column, "getType"):
output("</"+column.getType()+">\n")
else:
output("</td>\n")
output("</" + column.getType() + ">\n")
output("</tr>\n")
output("</table>\n")

Expand Down

0 comments on commit 85c144f

Please sign in to comment.