From ea66ae350b21c19c0ff13f2d741f3a9fa4ae58b4 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Sun, 30 Jan 2022 19:32:42 -0600 Subject: [PATCH] Use logger.warning() not .warn() consistently. --- fanficfare/browsercache/firefoxcache2.py | 2 +- fanficfare/browsercache/simplecache.py | 2 +- fanficfare/configurable.py | 2 +- fanficfare/geturls.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fanficfare/browsercache/firefoxcache2.py b/fanficfare/browsercache/firefoxcache2.py index 8f801887..62be8e06 100644 --- a/fanficfare/browsercache/firefoxcache2.py +++ b/fanficfare/browsercache/firefoxcache2.py @@ -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)) diff --git a/fanficfare/browsercache/simplecache.py b/fanficfare/browsercache/simplecache.py index 26b1347c..f8f4cb3b 100644 --- a/fanficfare/browsercache/simplecache.py +++ b/fanficfare/browsercache/simplecache.py @@ -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 diff --git a/fanficfare/configurable.py b/fanficfare/configurable.py index ceb668c5..2e82c9b8 100644 --- a/fanficfare/configurable.py +++ b/fanficfare/configurable.py @@ -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')) diff --git a/fanficfare/geturls.py b/fanficfare/geturls.py index 0ed336f8..3fc2c11e 100644 --- a/fanficfare/geturls.py +++ b/fanficfare/geturls.py @@ -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):