fix various logging.warn calls
Those are deprecated in favour of logging.warning now.
This commit is contained in:
@@ -513,7 +513,7 @@ def main():
|
|||||||
"files in the world directory?")
|
"files in the world directory?")
|
||||||
return 1
|
return 1
|
||||||
if rset is None: # indicates no such dimension was found
|
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)
|
render['dimension'][0], render_name)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
@@ -501,8 +501,8 @@ def main():
|
|||||||
# get the regionset for this dimension
|
# get the regionset for this dimension
|
||||||
rset = w.get_regionset(render['dimension'][1])
|
rset = w.get_regionset(render['dimension'][1])
|
||||||
if rset is None: # indicates no such dimension was found:
|
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 "
|
logging.warning("Sorry, you requested dimension '%s' for the render '%s', but I "
|
||||||
"find it.", render['dimension'][0], rname)
|
"couldn't find it.", render['dimension'][0], rname)
|
||||||
continue
|
continue
|
||||||
# List of regionsets that should be handled
|
# List of regionsets that should be handled
|
||||||
rsets = []
|
rsets = []
|
||||||
|
|||||||
6
setup.py
6
setup.py
@@ -212,8 +212,8 @@ class CustomClean(clean):
|
|||||||
os.remove(fname)
|
os.remove(fname)
|
||||||
|
|
||||||
except OSError:
|
except OSError:
|
||||||
log.warn("'%s' could not be cleaned -- permission denied",
|
log.warning("'%s' could not be cleaned -- permission denied",
|
||||||
fname)
|
fname)
|
||||||
else:
|
else:
|
||||||
log.debug("'%s' does not exist -- can't clean it",
|
log.debug("'%s' does not exist -- can't clean it",
|
||||||
fname)
|
fname)
|
||||||
@@ -223,7 +223,7 @@ class CustomClean(clean):
|
|||||||
for f in files:
|
for f in files:
|
||||||
if f.endswith(".pyc"):
|
if f.endswith(".pyc"):
|
||||||
if self.dry_run:
|
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:
|
else:
|
||||||
os.remove(os.path.join(root, f))
|
os.remove(os.path.join(root, f))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user