diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-02-26 18:35:32 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-02-26 18:35:32 +0100 |
| commit | 90ee943705e6ed373b778929c0bab94c6e34f674 (patch) | |
| tree | 533a3ed26fec69e07fa945617d5d0aae33047b99 /crawler.py | |
| parent | f54bb387475cd19e2f8d32cca131e2abb5eea8fd (diff) | |
| download | apigrabber-90ee943705e6ed373b778929c0bab94c6e34f674.tar.gz apigrabber-90ee943705e6ed373b778929c0bab94c6e34f674.zip | |
report job fails in queue
Diffstat (limited to 'crawler.py')
| -rw-r--r-- | crawler.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -7,6 +7,9 @@ import aiohttp APIURL = "https://api.dc01.gamelockerapp.com/" +class ApiError(Exception): + pass + class Crawler(object): def __init__(self, token): """Sets constants.""" @@ -65,7 +68,7 @@ class Crawler(object): if "errors" in res: logging.warn("API returned error: '%s'", res["errors"]) - break + raise ApiError(res["errors"]) yield res |
