mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-31 14:31:20 +00:00
* Began the fax * Bumped ruff * Fixed a BUNCH of ruff errors * Fixed a lot of ruff errors * Simplify if statements * Fixed black * Updated some stuff * Updated some stuff * A lot more ruff fixes * Added a fix * Added a fix * Fixed mypy * Fixed some stuff * Reverted one thing * Small fix * Small fix * Small fix * Added fix * Added fix * Update requirements
18 lines
465 B
Python
18 lines
465 B
Python
# IMPORTATION STANDARD
|
|
import contextlib
|
|
import logging
|
|
|
|
# IMPORTATION THIRDPARTY
|
|
# IMPORTATION INTERNAL
|
|
from openbb_terminal.core.log.generation.path_tracking_file_handler import (
|
|
PathTrackingFileHandler,
|
|
)
|
|
|
|
|
|
def do_rollover():
|
|
"""RollOver the log file."""
|
|
for handler in logging.getLogger().handlers:
|
|
if isinstance(handler, PathTrackingFileHandler):
|
|
with contextlib.suppress(PermissionError):
|
|
handler.doRollover()
|