Skip to content

Commit

Permalink
fix: logging.warn is deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
ssato committed Jan 3, 2018
1 parent d8a6e44 commit a4b7a9c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions anyconfig/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ def query(data, **options):
pexp = jmespath.compile(expression)
return pexp.search(data)
except ValueError as exc: # jmespath.exceptions.*Error inherit from it.
LOGGER.warn("Failed to compile or search: exp=%s, exc=%r",
expression, exc)
LOGGER.warning("Failed to compile or search: exp=%s, exc=%r",
expression, exc)
except (NameError, AttributeError):
LOGGER.warn("Filter module (jmespath) is not available. Do nothing.")
LOGGER.warning("Filter module (jmespath) is not available. "
"Do nothing.")

return data

Expand Down

0 comments on commit a4b7a9c

Please sign in to comment.