Fix domain and ttl bugs for RSS generation

In the context of RSS cloud domain was spelled incorrectly as ‚donain‘
which resulted in an error while unit testing. Additionally, also in
RSS ttl (Time to live) wasn’t transformed to a string.
This commit is contained in:
snipem 2014-06-02 22:47:45 +02:00
parent da06835e8b
commit 9213c3057e

View file

@ -342,7 +342,7 @@ class FeedGenerator(object):
textInput.attrib['link'] = self.__rss_textInput.get('link')
if self.__rss_ttl:
ttl = etree.SubElement(channel, 'ttl')
ttl.text = self.__rss_ttl
ttl.text = str(self.__rss_ttl)
if self.__rss_webMaster:
webMaster = etree.SubElement(channel, 'webMaster')
webMaster.text = self.__rss_webMaster
@ -626,7 +626,7 @@ class FeedGenerator(object):
:returns: Dictionary containing the cloud data.
'''
if not domain is None:
self.__rss_cloud = {'donain':domain, 'port':port, 'path':path,
self.__rss_cloud = {'domain':domain, 'port':port, 'path':path,
'registerProcedure':registerProcedure, 'protocol':protocol}
return self.__rss_cloud