Fix missing newline in warning message

This commit is contained in:
Ircama 2024-09-20 10:47:35 +02:00
parent 350ca81474
commit e15d9b3126

8
ui.py
View file

@ -622,11 +622,11 @@ class EpsonPrinterUI(tk.Tk):
self.show_status_text_view() self.show_status_text_view()
if isinstance(e, TimeoutError): if isinstance(e, TimeoutError):
self.status_text.insert( self.status_text.insert(
tk.END, f"[ERROR] printer is unreachable or offline." tk.END, f"[ERROR] printer is unreachable or offline.\n"
) )
else: else:
self.status_text.insert( self.status_text.insert(
tk.END, f"[ERROR] {e}\n{traceback.format_exc()}" tk.END, f"[ERROR] {e}\n{traceback.format_exc()}\n"
) )
def get_po_mins(self, cursor=True): def get_po_mins(self, cursor=True):
@ -660,10 +660,6 @@ class EpsonPrinterUI(tk.Tk):
tk.END, f"[INFO] Power off timer: {po_timer} minutes.\n" tk.END, f"[INFO] Power off timer: {po_timer} minutes.\n"
) )
self.po_timer_var.set(po_timer) self.po_timer_var.set(po_timer)
except TimeoutError:
self.status_text.insert(
tk.END, f"[ERROR] printer is unreachable or offline"
)
except Exception as e: except Exception as e:
self.handle_printer_error(e) self.handle_printer_error(e)
finally: finally: