lint: replace deprecated worn warn() w/ warning()

This commit is contained in:
boyska 2017-01-19 11:31:38 +01:00
parent 8e36d293df
commit 7f78bee6ff
No known key found for this signature in database
GPG key ID: 7395DCAE58289CA9
6 changed files with 9 additions and 9 deletions

View file

@ -17,7 +17,7 @@ def recent_choose(paths, howmany, minepoch):
found_files = {}
for path in paths:
if not os.path.exists(path):
logging.warn("Can't find requested path: %s", path)
logging.warning("Can't find requested path: %s", path)
continue
if os.path.isfile(path):
found_files[path] = get_mtime(path)

View file

@ -23,7 +23,7 @@ def generate(spec):
found_files = set()
for path in spec['paths']:
if not os.path.exists(path):
logging.warn("Can't find requested path: %s", path)
logging.warning("Can't find requested path: %s", path)
continue
if os.path.isfile(path):
found_files.add(path)

View file

@ -15,7 +15,7 @@ def generate(spec):
for path in spec['paths']:
if not os.path.exists(path):
logging.warn("Can't find requested path: %s", path)
logging.warning("Can't find requested path: %s", path)
continue
tmp = mkstemp(suffix=os.path.splitext(path)[-1],
prefix='audiogen-static-')

View file

@ -15,7 +15,7 @@ def get_suggested_files():
files = []
for path in get_conf()['FILE_PATH_SUGGESTION']:
if not os.path.isdir(path):
current_app.logger.warn('Invalid suggestion path: %s' % path)
current_app.logger.warning('Invalid suggestion path: %s' % path)
continue
pathfiles = scan_dir_audio(path)
files.extend(pathfiles)
@ -51,7 +51,7 @@ def get_suggested_scripts():
def get_suggestions():
files = get_suggested_files()
if len(files) > 200:
current_app.logger.warn("Too many suggested files, cropping")
current_app.logger.warning("Too many suggested files, cropping")
files = files[:200]
return dict(
files=files,

View file

@ -174,7 +174,7 @@ class Monitor(ParentedLet):
if timespec.eid in self.running:
del self.running[timespec.eid]
else:
self.log.warn('Timespec %s completed but not in running '
self.log.warning('Timespec %s completed but not in running '
'registry; this is most likely a bug',
timespec.get('nick', timespec.eid))
uris = []

View file

@ -134,7 +134,7 @@ def rpc_wip():
if obid in roots:
continue
if obid not in tree:
current_app.logger.warn('How strange, {} not in tree'
current_app.logger.warning('How strange, {} not in tree'
.format(obid))
continue
tree[tree[obid]['parent']]['children'][obid] = tree[obid]