Use logger.warning() not .warn() consistently.

This commit is contained in:
Jim Miller 2022-01-30 19:32:42 -06:00
parent ad3a16f423
commit ea66ae350b
4 changed files with 4 additions and 4 deletions

View file

@ -97,7 +97,7 @@ class FirefoxCache2(BaseBrowserCache):
self.add_key_mapping(cache_url,path,created)
self.count+=1
except Exception as e:
logger.warn("Cache file %s failed to load, skipping."%path)
logger.warning("Cache file %s failed to load, skipping."%path)
logger.debug(traceback.format_exc())
# logger.debug(" file time: %s"%datetime.datetime.fromtimestamp(stats.st_mtime))
# logger.debug("created time: %s"%datetime.datetime.fromtimestamp(created))

View file

@ -90,7 +90,7 @@ class SimpleCache(BaseBrowserCache):
self.add_key_mapping(cache_url,path,created)
self.count+=1
except Exception as e:
logger.warn("Cache file %s failed to load, skipping."%path)
logger.warning("Cache file %s failed to load, skipping."%path)
logger.debug(traceback.format_exc())
# key == filename for simple cache

View file

@ -1039,7 +1039,7 @@ class Configuration(ConfigParser):
age_limit=self.getConfig("browser_cache_age_limit"))
fetcher.BrowserCacheDecorator(self.browser_cache).decorate_fetcher(self.fetcher)
except Exception as e:
logger.warn("Failed to setup BrowserCache(%s)"%e)
logger.warning("Failed to setup BrowserCache(%s)"%e)
raise
## cache decorator terminates the chain when found.
logger.debug("use_basic_cache:%s"%self.getConfig('use_basic_cache'))

View file

@ -179,7 +179,7 @@ def cleanup_url(href,configuration,foremail=False):
href = adapter.get_request_redirected(href)[1]
href = href.replace('&index=1','')
except Exception as e:
logger.warn("Skipping royalroad email URL %s, got HTTP error %s"%(href,e))
logger.warning("Skipping royalroad email URL %s, got HTTP error %s"%(href,e))
return href
def get_urls_from_imap(srv,user,passwd,folder,markread=True):