From c953498a9d6d2bac323a6be17012ef30985759ba Mon Sep 17 00:00:00 2001 From: Safihre Date: Sun, 16 Aug 2020 09:05:32 +0200 Subject: [PATCH] Correct spelling error warning_helpful 1f554816b687856c05270ac2bc1ed977dffae51d Thanks @albino1 --- SABnzbd.py | 14 ++++++-------- sabnzbd/downloader.py | 2 +- sabnzbd/interface.py | 2 +- sabnzbd/misc.py | 2 +- sabnzbd/postproc.py | 2 +- tools/extract_pot.py | 2 +- 6 files changed, 11 insertions(+), 13 deletions(-) diff --git a/SABnzbd.py b/SABnzbd.py index e120a44..240eced 100755 --- a/SABnzbd.py +++ b/SABnzbd.py @@ -106,14 +106,14 @@ def guard_loglevel(): LOG_FLAG = True -def warning_helpfull(*args, **kwargs): +def warning_helpful(*args, **kwargs): """ Wrapper to ignore helpfull warnings if desired """ if sabnzbd.cfg.helpfull_warnings(): return logging.warning(*args, **kwargs) return logging.info(*args, **kwargs) -logging.warning_helpfull = warning_helpfull +logging.warning_helpful = warning_helpful class GUIHandler(logging.Handler): @@ -290,7 +290,7 @@ def identify_web_template(key, defweb, wdir): full_main = real_path(full_dir, DEF_MAIN_TMPL) if not os.path.exists(full_main): - logging.warning_helpfull(T("Cannot find web template: %s, trying standard template"), full_main) + logging.warning_helpful(T("Cannot find web template: %s, trying standard template"), full_main) full_dir = real_path(sabnzbd.DIR_INTERFACES, DEF_STDINTF) full_main = real_path(full_dir, DEF_MAIN_TMPL) if not os.path.exists(full_main): @@ -436,7 +436,7 @@ def print_modules(): if sabnzbd.newsunpack.RAR_PROBLEM: have_str = "%.2f" % (float(sabnzbd.newsunpack.RAR_VERSION) / 100) want_str = "%.2f" % (float(sabnzbd.constants.REC_RAR_VERSION) / 100) - logging.warning_helpfull( + logging.warning_helpful( T("Your UNRAR version is %s, we recommend version %s or higher.
"), have_str, want_str ) elif not (sabnzbd.WIN32 or sabnzbd.DARWIN): @@ -608,9 +608,7 @@ def get_webhost(cherryhost, cherryport, https_port): logging.info("IPV6 has priority on this system, potential Firefox issue") if ipv6 and ipv4 and cherryhost == "" and sabnzbd.WIN32: - logging.warning_helpfull( - T("Please be aware the 0.0.0.0 hostname will need an IPv6 address for external access") - ) + logging.warning_helpful(T("Please be aware the 0.0.0.0 hostname will need an IPv6 address for external access")) if cherryhost == "localhost" and not sabnzbd.WIN32 and not sabnzbd.DARWIN: # On the Ubuntu family, localhost leads to problems for CherryPy @@ -1170,7 +1168,7 @@ def main(): # On Linux/FreeBSD/Unix "UTF-8" is strongly, strongly adviced: if not sabnzbd.WIN32 and not sabnzbd.DARWIN and not ("utf-8" in sabnzbd.encoding.CODEPAGE.lower()): - logging.warning_helpfull( + logging.warning_helpful( T( "SABnzbd was started with encoding %s, this should be UTF-8. Expect problems with Unicoded file and directory names in downloads." ), diff --git a/sabnzbd/downloader.py b/sabnzbd/downloader.py index 814373e..485cf98 100644 --- a/sabnzbd/downloader.py +++ b/sabnzbd/downloader.py @@ -326,7 +326,7 @@ class Downloader(Thread): if mx: self.bandwidth_limit = mx * self.bandwidth_perc / 100 else: - logging.warning_helpfull(T("You must set a maximum bandwidth before you can set a bandwidth limit")) + logging.warning_helpful(T("You must set a maximum bandwidth before you can set a bandwidth limit")) else: self.bandwidth_limit = from_units(value) if mx: diff --git a/sabnzbd/interface.py b/sabnzbd/interface.py index f943a0a..ee96afe 100644 --- a/sabnzbd/interface.py +++ b/sabnzbd/interface.py @@ -1535,7 +1535,7 @@ class ConfigGeneral: cfg.bandwidth_perc.set(bandwidth_perc) bandwidth_perc = cfg.bandwidth_perc() if bandwidth_perc and not bandwidth_max: - logging.warning_helpfull(T("You must set a maximum bandwidth before you can set a bandwidth limit")) + logging.warning_helpful(T("You must set a maximum bandwidth before you can set a bandwidth limit")) config.save_config() diff --git a/sabnzbd/misc.py b/sabnzbd/misc.py index 878790a..a7310e6 100644 --- a/sabnzbd/misc.py +++ b/sabnzbd/misc.py @@ -792,7 +792,7 @@ def get_all_passwords(nzo): # Check size if len(pws) > 30: - logging.warning_helpfull( + logging.warning_helpful( T( "Your password file contains more than 30 passwords, testing all these passwords takes a lot of time. Try to only list useful passwords." ) diff --git a/sabnzbd/postproc.py b/sabnzbd/postproc.py index f3b553a..5ee8cd1 100644 --- a/sabnzbd/postproc.py +++ b/sabnzbd/postproc.py @@ -220,7 +220,7 @@ class PostProcessor(Thread): # First we do a dircheck complete_dir = sabnzbd.cfg.complete_dir.get_path() if sabnzbd.utils.checkdir.isFAT(complete_dir): - logging.warning_helpfull( + logging.warning_helpful( T("Completed Download Folder %s is on FAT file system, limiting maximum file size to 4GB") % complete_dir ) diff --git a/tools/extract_pot.py b/tools/extract_pot.py index f8ef4c0..8d88c02 100755 --- a/tools/extract_pot.py +++ b/tools/extract_pot.py @@ -103,7 +103,7 @@ def get_context(ctx_line): else: if "logging.error(" in srcline: context = "Error message" - elif "logging.warning(" in srcline or "logging.warning_helpfull(" in srcline: + elif "logging.warning(" in srcline or "logging.warning_helpful(" in srcline: context = "Warning message" if context and context not in contexts: