Skip to content

Commit

Permalink
Cosmetic change.
Browse files Browse the repository at this point in the history
  • Loading branch information
theypsilon committed Feb 15, 2025
1 parent 1d4706f commit 867049a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/downloader/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down

0 comments on commit 867049a

Please sign in to comment.