[deviantart] move delay-increase after expect_error check

[ci skip]
This commit is contained in:
Mike Fährmann 2018-03-15 16:44:58 +01:00
parent 557cb94f81
commit f367d5c281
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -478,8 +478,6 @@ class DeviantartAPI():
break
else:
self.delay += 1
if response.status_code == 429:
msg = "Rate limit reached"
else:
@ -487,6 +485,7 @@ class DeviantartAPI():
return None
msg = "API responded with {} {}".format(
response.status_code, response.reason)
self.delay += 1
self.log.warning(
"%s. Using %ds delay.", msg, 2 ** (self.delay-1))
self.log.debug(response.text)