Print 404 error separately from general stacktrace.

master
voussoir 2020-11-27 15:41:08 -08:00
parent 14b90ef73c
commit 50f61d792c
1 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import copy import copy
import prawcore
import time import time
import traceback import traceback
@ -152,6 +153,10 @@ def _livestream_as_a_generator(
) )
newitems = database.insert(items) newitems = database.insert(items)
yield newitems yield newitems
except prawcore.exceptions.NotFound:
print(database.filepath.basename, '404 not found')
step = {'tsdb': database, 'new_comments': 0, 'new_submissions': 0}
yield step
except Exception: except Exception:
traceback.print_exc() traceback.print_exc()
print('Retrying...') print('Retrying...')