replace logging.warn with warning

call is deprected in python 3.7

Fixes: https://pagure.io/koji/issue/2135
This commit is contained in:
Tomas Kopecek 2020-04-06 09:59:06 +02:00
parent ef0730f5d5
commit 0132313f92
13 changed files with 63 additions and 62 deletions

View file

@ -83,7 +83,7 @@ def safe_rmtree(path, unmount=False, strict=True):
if strict:
raise
else:
logger.warn("Error removing: %s", exc_info=True)
logger.warning("Error removing: %s", exc_info=True)
return 1
return 0
if not os.path.exists(path):
@ -94,7 +94,7 @@ def safe_rmtree(path, unmount=False, strict=True):
try:
koji.util.rmtree(path)
except Exception:
logger.warn('file removal failed for %s' % path)
logger.warning('file removal failed for %s' % path)
if strict:
raise
return 1