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