diff --git a/common.py b/common.py index 4bc2341..c0f62ad 100644 --- a/common.py +++ b/common.py @@ -138,7 +138,7 @@ def api_send_status(name, status, api, token): else: print("Warning: Unable to send status '" + status + "' for tile '" + name + "'. Trying again in 60 seconds") sleep(60) - except (ConnectionError, OSError, IOError, json.decoder.JSONDecodeError): + except (ConnectionError, OSError, IOError, json.JSONDecodeError): print("Warning: Unable to send status " + status + " for tile " + name + ". Trying again in 60 seconds") sleep(60) @@ -191,7 +191,7 @@ def api_get_job(action, new_status, api, token, none_exit=True, all_in_parent=0) sleep(60) ret = api_get_job(action, new_status, api, token, none_exit, all_in_parent) return ret - except (ConnectionError, OSError, IOError, json.decoder.JSONDecodeError): + except (ConnectionError, OSError, IOError, json.JSONDecodeError): print("Unable to get job. Retrying in 60 seconds...") sleep(60) ret = api_get_job(action, new_status, api, token, none_exit, all_in_parent) @@ -234,6 +234,6 @@ def api_get_status(name, api, api_token): else: print("ERROR: Unable to get status.") sys.exit(1) - except (ConnectionError, OSError, IOError, json.decoder.JSONDecodeError): + except (ConnectionError, OSError, IOError, json.JSONDecodeError): print("ERROR: Unable to get status.") sys.exit(1)