Change deprecated logger.warn by warning

This commit is contained in:
Gerald Lonlas 2018-03-30 12:11:06 -07:00
parent 0a32d38ad9
commit 96b2210c0f

View File

@ -30,11 +30,11 @@ def retrier(f):
return f(*args, **kwargs) return f(*args, **kwargs)
# TODO dont be a gotta-catch-them-all pokemon collector # TODO dont be a gotta-catch-them-all pokemon collector
except Exception as ex: except Exception as ex:
logger.warn('%s returned exception: "%s"', f, ex) logger.warning('%s returned exception: "%s"', f, ex)
if count > 0: if count > 0:
count -= 1 count -= 1
kwargs.update({'count': count}) kwargs.update({'count': count})
logger.warn('retrying %s still for %s times', f, count) logger.warning('retrying %s still for %s times', f, count)
return wrapper(*args, **kwargs) return wrapper(*args, **kwargs)
else: else:
raise OperationalException('Giving up retrying: %s', f) raise OperationalException('Giving up retrying: %s', f)