From a6efb86f5ca258a8881de640aae5dc3b0763256b Mon Sep 17 00:00:00 2001 From: gutosie Date: Mon, 16 Jan 2023 15:46:36 +0200 Subject: [PATCH] Update stbbranding.py --- NeoBoot/files/stbbranding.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/NeoBoot/files/stbbranding.py b/NeoBoot/files/stbbranding.py index 40ee35b..eff8602 100644 --- a/NeoBoot/files/stbbranding.py +++ b/NeoBoot/files/stbbranding.py @@ -45,11 +45,13 @@ def clearMemory(): def LogCrashGS(line): - log_file = open('%sImageBoot/neoboot.log' % getNeoLocation(), 'a') - log_file.write(line) - log_file.close() - - + if os.path.isfile('' + getNeoLocation() + 'ImageBoot/neoboot.log'): + os.system(' rm -f ' + getNeoLocation() + 'ImageBoot/neoboot.log;') + log_file = open('%sImageBoot/neoboot.log' % getNeoLocation(), 'a') + log_file.write(line) + log_file.close() + + def fileCheck(f, mode='r'): return fileExists(f, mode) and f