Print 404 error separately from general stacktrace.
This commit is contained in:
parent
14b90ef73c
commit
50f61d792c
1 changed files with 5 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
import copy
|
||||
import prawcore
|
||||
import time
|
||||
import traceback
|
||||
|
||||
|
@ -152,6 +153,10 @@ def _livestream_as_a_generator(
|
|||
)
|
||||
newitems = database.insert(items)
|
||||
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:
|
||||
traceback.print_exc()
|
||||
print('Retrying...')
|
||||
|
|
Loading…
Reference in a new issue