From 74b0f50c619a5129580b0758c8d7d73225c366e9 Mon Sep 17 00:00:00 2001 From: "Schimon Jehudah, Adv." Date: Mon, 16 Sep 2024 16:10:46 +0300 Subject: [PATCH] Fix errors of type UnboundLocalError (Thank you. roughnecks). --- pubsub_to_atom.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pubsub_to_atom.py b/pubsub_to_atom.py index cc9d220..23af1ef 100644 --- a/pubsub_to_atom.py +++ b/pubsub_to_atom.py @@ -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