forked from indymedia/epicyon
Check newswire for no return value
parent
9f70a96f51
commit
4c1553e1e7
|
@ -471,6 +471,9 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
|
|||
maxMirroredArticles: int) -> None:
|
||||
"""Converts rss items in a newswire into posts
|
||||
"""
|
||||
if not newswire:
|
||||
return
|
||||
|
||||
basePath = baseDir + '/accounts/news@' + domain + '/outbox'
|
||||
if not os.path.isdir(basePath):
|
||||
os.mkdir(basePath)
|
||||
|
@ -669,6 +672,9 @@ def mergeWithPreviousNewswire(oldNewswire: {}, newNewswire: {}) -> None:
|
|||
"""Preserve any votes or generated activitypub post filename
|
||||
as rss feeds are updated
|
||||
"""
|
||||
if not oldNewswire:
|
||||
return
|
||||
|
||||
for published, fields in oldNewswire.items():
|
||||
if not newNewswire.get(published):
|
||||
continue
|
||||
|
|
|
@ -354,6 +354,8 @@ def getRSSfromDict(baseDir: str, newswire: {},
|
|||
rssStr = rss2Header(httpPrefix,
|
||||
None, domainFull,
|
||||
'Newswire', translate)
|
||||
if not newswire:
|
||||
return ''
|
||||
for published, fields in newswire.items():
|
||||
if '+00:00' in published:
|
||||
published = published.replace('+00:00', 'Z').strip()
|
||||
|
|
Loading…
Reference in New Issue