From 93ab1ab45ad0cf8f2ae6cd148f6c8e4500f01b8f Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sat, 27 Dec 2025 23:13:31 +0100 Subject: Use logging instead of print --- src/ui/book_entries.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ui/book_entries.py b/src/ui/book_entries.py index edd9457..e44d5a3 100644 --- a/src/ui/book_entries.py +++ b/src/ui/book_entries.py @@ -4,9 +4,12 @@ from gi.repository import Gtk, Gio, GLib import pathlib import os import subprocess +import logging import src.utils as utils +logger = logging.getLogger(__name__) + class BookEntries(Gtk.Box): def __init__(self, window): @@ -56,7 +59,7 @@ class BookEntries(Gtk.Box): path = pathlib.Path(file.get_path()) self.add_book(path) except GLib.Error as error: - print(f'Error opening file: {error.message}') + logger.error(f'Error opening file: %s', error.message) def add_book(self, path): name = os.path.splitext(os.path.basename(path))[0] -- cgit v1.2.3