mirror of
https://github.com/clearml/clearml
synced 2025-03-03 18:52:12 +00:00
PEP8
This commit is contained in:
parent
132e76cfb9
commit
cf3c6ba815
@ -158,8 +158,6 @@ class BackgroundLogService(BackgroundMonitor):
|
||||
# noinspection PyProtectedMember
|
||||
TaskHandler._log_stderr(
|
||||
"{}\nWARNING: trains.log - Failed logging task to backend ({:d} lines)".format(ex, len(buffer)))
|
||||
import traceback
|
||||
traceback.print_stack()
|
||||
|
||||
def flush(self):
|
||||
if self.is_alive():
|
||||
@ -230,11 +228,10 @@ class TaskHandler(BufferingHandler):
|
||||
TaskHandler.__once = True
|
||||
|
||||
# if we passed the max buffer
|
||||
return self.counter >= self.capacity and self._background_log and \
|
||||
self._background_log_size >= self.capacity
|
||||
return (self.counter >= self.capacity and self._background_log and
|
||||
self._background_log_size >= self.capacity)
|
||||
|
||||
def flush(self):
|
||||
import traceback
|
||||
if self._task_id is None:
|
||||
return
|
||||
self.counter = 0
|
||||
|
@ -1178,7 +1178,12 @@ class Logger(object):
|
||||
|
||||
@classmethod
|
||||
def _remove_std_logger(cls):
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
StdStreamPatch.remove_std_logger()
|
||||
except Exception:
|
||||
return False
|
||||
return True
|
||||
|
||||
def _console(self, msg, level=logging.INFO, omit_console=False, *args, **_):
|
||||
# type: (str, int, bool, Any, Any) -> None
|
||||
|
Loading…
Reference in New Issue
Block a user