Skip to content

Commit

Permalink
Replace logger.warn w/ logger.warning (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
zklaus authored Jun 11, 2024
1 parent 24c87b3 commit 5bc9e49
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion menuinst/_legacy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def install(path, remove=False, prefix=None, recursing=False, root_prefix=None):
pass

if retcode != 0:
logging.warn(
logging.warning(
"Insufficient permissions to write menu folder. "
"Falling back to user location"
)
Expand Down
2 changes: 1 addition & 1 deletion menuinst/_legacy/win32.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def __init__(
# required. If the process isn't elevated, we get the
# WindowsError
if 'user' in dirs_src and used_mode == 'system':
logger.warn(
logger.warning(
"Insufficient permissions to write menu folder. "
"Falling back to user location"
)
Expand Down
2 changes: 1 addition & 1 deletion menuinst/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def _install_adapter(
kwargs["root_prefix"] = DEFAULT_BASE_PREFIX
_legacy_install(json_path, remove=remove, prefix=prefix, **kwargs)
else:
log.warn(
log.warning(
"menuinst._legacy is only supported on Windows. "
"Switch to the new-style menu definitions "
"for cross-platform compatibility."
Expand Down
2 changes: 1 addition & 1 deletion menuinst/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def wrapper_elevate(
logger.debug("Elevating command: %s", cmd)
return_code = run_as_admin(cmd)
except Exception as exc:
logger.warn("Elevation failed! Falling back to user mode.", exc_info=exc)
logger.warning("Elevation failed! Falling back to user mode.", exc_info=exc)
else:
os.environ.pop("_MENUINST_RECURSING", None)
if return_code == 0: # success, we are done
Expand Down

0 comments on commit 5bc9e49

Please sign in to comment.