From 867049ae2bed0e070d1720d6cb8f8c887e5fb626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20manuel=20Barroso=20Galindo?= Date: Sat, 15 Feb 2025 05:23:28 +0100 Subject: [PATCH] Cosmetic change. --- src/downloader/logger.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/downloader/logger.py b/src/downloader/logger.py index f23bb2c..befb0ef 100644 --- a/src/downloader/logger.py +++ b/src/downloader/logger.py @@ -41,12 +41,6 @@ def debug(self, *args, sep='', end='\n', flush=True): def bench(self, *args): _do_print(*args, sep='', end='\n', file=sys.stdout, flush=True) - -class OffLogger(Logger): - def print(self, *args, sep='', end='\n', file=sys.stdout, flush=False): pass - def debug(self, *args, sep='', end='\n', file=sys.stdout, flush=False): pass - def bench(self, *args): pass - def _do_print(*args, sep, end, file, flush): try: print(*args, sep=sep, end=end, file=file, flush=flush) @@ -59,6 +53,12 @@ def _do_print(*args, sep, end, file, flush): print('An unknown exception occurred during logging: %s' % str(error)) +class OffLogger(Logger): + def print(self, *args, sep='', end='\n', file=sys.stdout, flush=False): pass + def debug(self, *args, sep='', end='\n', file=sys.stdout, flush=False): pass + def bench(self, *args): pass + + class FilelogSaver(Protocol): def save_log_from_tmp(self, tmp_logfile: str) -> None: pass