Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def wait_for_tables(cls, timeout=30):
watch = tempora.timing.Stopwatch()
while watch.split() < datetime.timedelta(seconds=timeout):
try:
cls.check_logs('#check')
return
except Exception:
# short-circuit if the bot has stopped
if cls.bot.poll() is not None:
return
time.sleep(0.2)