Make Generator Optional (Atom)
This patch makes the field generator optional in Atom, allowing to set an empty string to disable the element in the same way it is disabled in RSS already: ```python # disable generator element fg.generator('') ``` This fixes #89
This commit is contained in:
parent
26b64ca9fc
commit
5a68e682d9
1 changed files with 1 additions and 1 deletions
|
@ -165,7 +165,7 @@ class FeedGenerator(object):
|
|||
uri = etree.SubElement(contrib, 'uri')
|
||||
uri.text = c.get('uri')
|
||||
|
||||
if self.__atom_generator:
|
||||
if self.__atom_generator and self.__atom_generator.get('value'):
|
||||
generator = etree.SubElement(feed, 'generator')
|
||||
generator.text = self.__atom_generator['value']
|
||||
if self.__atom_generator.get('uri'):
|
||||
|
|
Loading…
Reference in a new issue