Catch all possible Reddit API exceptions
This commit is contained in:
parent
f777348af8
commit
f15d108971
|
@ -32,10 +32,7 @@ def feed():
|
|||
return [x.id for x in reddit.subreddit(subs).hot()]
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except PRAWException as e:
|
||||
logging.critical('Problem hitting reddit API: {}'.format(str(e)))
|
||||
return []
|
||||
except PrawcoreException as e:
|
||||
except BaseException as e:
|
||||
logging.critical('Problem hitting reddit API: {}'.format(str(e)))
|
||||
return []
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user