forked from sig_core/toolkit
ensure double descriptions aren't happening
This commit is contained in:
parent
8f08a0ca71
commit
8b428ef521
@ -117,7 +117,10 @@ class RepoRSS:
|
|||||||
package_hex = binascii.hexlify(package.chksum[1]).decode()
|
package_hex = binascii.hexlify(package.chksum[1]).decode()
|
||||||
title = xmlescape(str(package))
|
title = xmlescape(str(package))
|
||||||
date = time.gmtime(float(package.buildtime))
|
date = time.gmtime(float(package.buildtime))
|
||||||
description = package.description
|
pkg_description = package.description
|
||||||
|
# package.description is sometimes a NoneType. Don't know why.
|
||||||
|
if not pkg_description:
|
||||||
|
pkg_description = ''
|
||||||
link = xmlescape(package.remote_location())
|
link = xmlescape(package.remote_location())
|
||||||
# form description
|
# form description
|
||||||
changelog = ''
|
changelog = ''
|
||||||
@ -136,7 +139,7 @@ class RepoRSS:
|
|||||||
desc = meta['text']
|
desc = meta['text']
|
||||||
changelog += f'{cl_date} - {author}\n{desc}\n\n'
|
changelog += f'{cl_date} - {author}\n{desc}\n\n'
|
||||||
description = '<p><strong>{}</strong> - {}</p>\n\n'.format(xmlescape(package.name), xmlescape(package.summary))
|
description = '<p><strong>{}</strong> - {}</p>\n\n'.format(xmlescape(package.name), xmlescape(package.summary))
|
||||||
description += '<p>%s</p>\n\n<p><strong>Change Log:</strong></p>\n\n' % xmlescape(to_unicode(description.replace("\n", "<br />\n")))
|
description += '<p>%s</p>\n\n<p><strong>Change Log:</strong></p>\n\n' % xmlescape(to_unicode(pkg_description.replace("\n", "<br />\n")))
|
||||||
description += xmlescape('<pre>{}</pre>'.format(xmlescape(to_unicode(changelog))))
|
description += xmlescape('<pre>{}</pre>'.format(xmlescape(to_unicode(changelog))))
|
||||||
|
|
||||||
# start item
|
# start item
|
||||||
|
Loading…
Reference in New Issue
Block a user