Fix log string formatting

This commit is contained in:
Ferit Yiğit BALABAN 2022-04-28 14:19:40 +03:00
parent 97c66275d3
commit e9db891451

View File

@ -24,7 +24,7 @@ KBD_NAME = 'asus::kbd_backlight'
def write(status: str): def write(status: str):
log = f'[{datetime.now().strftime("%d/%m/%y-%H.%M.%S")}]' log = f'[{datetime.now().strftime("%d/%m/%y-%H.%M.%S")}]'
log += 'navi is going dark.' if status == 'dark' else 'navi is enlightened.' log += ' navi is going dark.\n' if status == 'dark' else ' navi is enlightened.\n'
with open(PATH_LOGFL, 'a') as f: with open(PATH_LOGFL, 'a') as f:
f.write(log) f.write(log)
f.close() f.close()