Update wallabag.py

This commit is contained in:
FoxMaSk
2017-06-28 09:19:04 +02:00
committed by GitHub
parent 12c30c6af3
commit fa9c6360a5

View File

@@ -95,6 +95,10 @@ class Wallabag(object):
try: try:
json_data = responses.json() json_data = responses.json()
except: except:
# sometimes json_data does not return any json() without
# any error. This is due to the grabbing URL which "rejects"
# the URL
if 'errors' in json_data:
for error in json_data['errors']: for error in json_data['errors']:
error_json = json_data['errors'][error]['content'] error_json = json_data['errors'][error]['content']
logging.error("Wallabag: {error}".format(error=error_json)) logging.error("Wallabag: {error}".format(error=error_json))