From 76bbabb7dedd9174e8e51f8b6a1cf2b53f261859 Mon Sep 17 00:00:00 2001 From: Nicolas F Date: Wed, 11 Dec 2019 18:42:35 +0100 Subject: [PATCH] fix various logging.warn calls Those are deprecated in favour of logging.warning now. --- overviewer.py | 2 +- overviewer_core/aux_files/genPOI.py | 4 ++-- setup.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/overviewer.py b/overviewer.py index ac776c4..8e9783b 100755 --- a/overviewer.py +++ b/overviewer.py @@ -513,7 +513,7 @@ def main(): "files in the world directory?") return 1 if rset is None: # indicates no such dimension was found - logging.warn("Sorry, you requested dimension '%s' for %s, but I couldn't find it.", + logging.warning("Sorry, you requested dimension '%s' for %s, but I couldn't find it.", render['dimension'][0], render_name) continue diff --git a/overviewer_core/aux_files/genPOI.py b/overviewer_core/aux_files/genPOI.py index f85fff0..4b01268 100755 --- a/overviewer_core/aux_files/genPOI.py +++ b/overviewer_core/aux_files/genPOI.py @@ -501,8 +501,8 @@ def main(): # get the regionset for this dimension rset = w.get_regionset(render['dimension'][1]) if rset is None: # indicates no such dimension was found: - logging.warn("Sorry, you requested dimension '%s' for the render '%s', but I couldn't " - "find it.", render['dimension'][0], rname) + logging.warning("Sorry, you requested dimension '%s' for the render '%s', but I " + "couldn't find it.", render['dimension'][0], rname) continue # List of regionsets that should be handled rsets = [] diff --git a/setup.py b/setup.py index 3c98998..af0abd6 100755 --- a/setup.py +++ b/setup.py @@ -212,8 +212,8 @@ class CustomClean(clean): os.remove(fname) except OSError: - log.warn("'%s' could not be cleaned -- permission denied", - fname) + log.warning("'%s' could not be cleaned -- permission denied", + fname) else: log.debug("'%s' does not exist -- can't clean it", fname) @@ -223,7 +223,7 @@ class CustomClean(clean): for f in files: if f.endswith(".pyc"): if self.dry_run: - log.warn("Would remove %s", os.path.join(root,f)) + log.warning("Would remove %s", os.path.join(root,f)) else: os.remove(os.path.join(root, f))