Fix errors of type UnboundLocalError (Thank you. roughnecks).

This commit is contained in:
Schimon Jehudah, Adv. 2024-09-16 16:10:46 +03:00
parent 028fdacc39
commit 74b0f50c61

View file

@ -339,10 +339,14 @@ def generate_atom_post(iq, link):
if author_email is not None:
author_email_text = author_email.text
if author_email_text: ET.SubElement(e_author, 'email').text = author_email.text
else:
author_email_text = None
author_uri = author.find(namespace + 'uri')
if author_uri is not None:
author_uri_text = author_uri.text
if author_uri_text: ET.SubElement(e_author, 'uri').text = author_uri.text
else:
author_uri_text = None
author_name = author.find(namespace + 'name')
if author_name is not None and author_name.text:
author_name_text = author_name.text