WatchWebsite module: catch Atom parse error
This commit is contained in:
parent
b2662139f5
commit
a975421e02
@ -115,7 +115,12 @@ def alert_change(content, site):
|
||||
site["_lastpage"] = Atom(content)
|
||||
else:
|
||||
site["_lastpage"] = Atom(site["lastcontent"])
|
||||
page = Atom(content)
|
||||
try:
|
||||
page = Atom(content)
|
||||
except:
|
||||
print ("An error occurs during Atom parsing. Restart event...")
|
||||
start_watching(site)
|
||||
return
|
||||
diff = site["_lastpage"].diff(page)
|
||||
if len(diff) > 0:
|
||||
site["_lastpage"] = page
|
||||
|
Loading…
Reference in New Issue
Block a user