fix to the log file not existing on first start
This commit is contained in:
6
main.py
6
main.py
@@ -1702,7 +1702,11 @@ if __name__ == "__main__":
|
||||
else:
|
||||
log_path = os.path.join(os.getcwd(), "flares.log")
|
||||
|
||||
os.remove(log_path)
|
||||
try:
|
||||
os.remove(log_path)
|
||||
except:
|
||||
pass
|
||||
|
||||
sys.stdout = open(log_path, "a", buffering=1)
|
||||
sys.stderr = sys.stdout
|
||||
print(f"\n=== App started at {datetime.now()} ===\n")
|
||||
|
||||
Reference in New Issue
Block a user