mirror of
https://github.com/dw-0/kiauh.git
synced 2026-03-22 02:18:36 +05:00
fix: prevent exception when trying to remove log files from non-existing directory
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -164,6 +164,9 @@ class BaseInstance(ABC):
|
||||
def delete_logfiles(self, log_name: str) -> None:
|
||||
from utils.fs_utils import run_remove_routines
|
||||
|
||||
if not self.log_dir.exists():
|
||||
return
|
||||
|
||||
files = self.log_dir.iterdir()
|
||||
logs = [f for f in files if f.name.startswith(log_name)]
|
||||
for log in logs:
|
||||
|
||||
Reference in New Issue
Block a user