lint: replace deprecated worn warn() w/ warning()
This commit is contained in:
parent
8e36d293df
commit
7f78bee6ff
6 changed files with 9 additions and 9 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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-')
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -174,9 +174,9 @@ 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 '
|
||||
'registry; this is most likely a bug',
|
||||
timespec.get('nick', timespec.eid))
|
||||
self.log.warning('Timespec %s completed but not in running '
|
||||
'registry; this is most likely a bug',
|
||||
timespec.get('nick', timespec.eid))
|
||||
uris = []
|
||||
for audiospec in audiospecs:
|
||||
try:
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue