Skip to content

Commit

Permalink
workaround for #350 (#479)
Browse files Browse the repository at this point in the history
* workaround for #350

workaround for bug #350
this stop the empty person being output which in turn causes parseXML to fail

* remove debugging output
  • Loading branch information
reubot committed Sep 23, 2023
1 parent 86483a7 commit 1a61d8f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion imdb/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -977,13 +977,18 @@ def _tag4TON(ton, addAccessSystem=False, _containerOnly=False):
else:
beginTag += '>'
else:
# workaround for #350
beginTag=""
if not _containerOnly:
beginTag = '<%s><%s>%s</%s>' % (tag, what, value, what)
if value:
beginTag = '<%s><%s>%s</%s>' % (tag, what, value, what)
else:
beginTag = '<%s>' % tag
beginTag += extras
if ton.notes:
beginTag += '<notes>%s</notes>' % _normalizeValue(ton.notes)
if beginTag is "":
return beginTag
return beginTag, '</%s>' % tag


Expand Down

0 comments on commit 1a61d8f

Please sign in to comment.