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 = {}
|
found_files = {}
|
||||||
for path in paths:
|
for path in paths:
|
||||||
if not os.path.exists(path):
|
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
|
continue
|
||||||
if os.path.isfile(path):
|
if os.path.isfile(path):
|
||||||
found_files[path] = get_mtime(path)
|
found_files[path] = get_mtime(path)
|
||||||
|
|
|
@ -23,7 +23,7 @@ def generate(spec):
|
||||||
found_files = set()
|
found_files = set()
|
||||||
for path in spec['paths']:
|
for path in spec['paths']:
|
||||||
if not os.path.exists(path):
|
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
|
continue
|
||||||
if os.path.isfile(path):
|
if os.path.isfile(path):
|
||||||
found_files.add(path)
|
found_files.add(path)
|
||||||
|
|
|
@ -15,7 +15,7 @@ def generate(spec):
|
||||||
|
|
||||||
for path in spec['paths']:
|
for path in spec['paths']:
|
||||||
if not os.path.exists(path):
|
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
|
continue
|
||||||
tmp = mkstemp(suffix=os.path.splitext(path)[-1],
|
tmp = mkstemp(suffix=os.path.splitext(path)[-1],
|
||||||
prefix='audiogen-static-')
|
prefix='audiogen-static-')
|
||||||
|
|
|
@ -15,7 +15,7 @@ def get_suggested_files():
|
||||||
files = []
|
files = []
|
||||||
for path in get_conf()['FILE_PATH_SUGGESTION']:
|
for path in get_conf()['FILE_PATH_SUGGESTION']:
|
||||||
if not os.path.isdir(path):
|
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
|
continue
|
||||||
pathfiles = scan_dir_audio(path)
|
pathfiles = scan_dir_audio(path)
|
||||||
files.extend(pathfiles)
|
files.extend(pathfiles)
|
||||||
|
@ -51,7 +51,7 @@ def get_suggested_scripts():
|
||||||
def get_suggestions():
|
def get_suggestions():
|
||||||
files = get_suggested_files()
|
files = get_suggested_files()
|
||||||
if len(files) > 200:
|
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]
|
files = files[:200]
|
||||||
return dict(
|
return dict(
|
||||||
files=files,
|
files=files,
|
||||||
|
|
|
@ -174,9 +174,9 @@ class Monitor(ParentedLet):
|
||||||
if timespec.eid in self.running:
|
if timespec.eid in self.running:
|
||||||
del self.running[timespec.eid]
|
del self.running[timespec.eid]
|
||||||
else:
|
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',
|
'registry; this is most likely a bug',
|
||||||
timespec.get('nick', timespec.eid))
|
timespec.get('nick', timespec.eid))
|
||||||
uris = []
|
uris = []
|
||||||
for audiospec in audiospecs:
|
for audiospec in audiospecs:
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -134,7 +134,7 @@ def rpc_wip():
|
||||||
if obid in roots:
|
if obid in roots:
|
||||||
continue
|
continue
|
||||||
if obid not in tree:
|
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))
|
.format(obid))
|
||||||
continue
|
continue
|
||||||
tree[tree[obid]['parent']]['children'][obid] = tree[obid]
|
tree[tree[obid]['parent']]['children'][obid] = tree[obid]
|
||||||
|
|
Loading…
Reference in a new issue