mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Fix - cannot pull response from ordinary exception
This commit is contained in:
parent
7a08c5e98c
commit
158b1481d4
1 changed files with 3 additions and 9 deletions
|
|
@ -397,15 +397,9 @@ class SlackPython2Operations(AbstractSlackOperations):
|
|||
groups = self._get_groups()
|
||||
break
|
||||
except Exception as e:
|
||||
retry_after = e.response.headers.get("Retry-After")
|
||||
if retry_after:
|
||||
print(
|
||||
"Rate limit hit, sleeping for {}".format(retry_after))
|
||||
time.sleep(int(retry_after))
|
||||
else:
|
||||
self.log.warning("Cannot pull user info, "
|
||||
"mentions won't work", exc_info=True)
|
||||
return [], []
|
||||
self.log.warning("Cannot pull user info, "
|
||||
"mentions won't work", exc_info=True)
|
||||
return [], []
|
||||
|
||||
return users, groups
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue