fix depricated usage log.warn -> log.warning

This commit is contained in:
Manuel Barkhau 2019-02-14 22:03:32 +01:00
parent b7f2eeb091
commit bc87ab1b88

View file

@ -195,9 +195,9 @@ def _assert_not_dirty(vcs, filepaths: typ.Set[str], allow_dirty: bool):
dirty_files = vcs.status() dirty_files = vcs.status()
if dirty_files: if dirty_files:
log.warn(f"{vcs.name} working directory is not clean:") log.warning(f"{vcs.name} working directory is not clean:")
for dirty_file in dirty_files: for dirty_file in dirty_files:
log.warn(" " + dirty_file) log.warning(" " + dirty_file)
if not allow_dirty and dirty_files: if not allow_dirty and dirty_files:
sys.exit(1) sys.exit(1)
@ -206,7 +206,7 @@ def _assert_not_dirty(vcs, filepaths: typ.Set[str], allow_dirty: bool):
if dirty_pattern_files: if dirty_pattern_files:
log.error("Not commiting when pattern files are dirty:") log.error("Not commiting when pattern files are dirty:")
for dirty_file in dirty_pattern_files: for dirty_file in dirty_pattern_files:
log.warn(" " + dirty_file) log.warning(" " + dirty_file)
sys.exit(1) sys.exit(1)
@ -216,7 +216,7 @@ def _bump(cfg: config.Config, new_version: str, allow_dirty: bool = False) -> No
try: try:
_vcs = vcs.get_vcs() _vcs = vcs.get_vcs()
except OSError: except OSError:
log.warn("Version Control System not found, aborting commit.") log.warning("Version Control System not found, aborting commit.")
_vcs = None _vcs = None
filepaths = set(cfg.file_patterns.keys()) filepaths = set(cfg.file_patterns.keys())