diff options
| author | Joris Guyonvarch | 2025-12-27 23:13:31 +0100 |
|---|---|---|
| committer | Joris Guyonvarch | 2025-12-27 23:13:31 +0100 |
| commit | 93ab1ab45ad0cf8f2ae6cd148f6c8e4500f01b8f (patch) | |
| tree | 63125e177cc288b2c83f7c575025025904c0b0ed /src/ui/book_entries.py | |
| parent | d8e68f19b2812573033dfbe8cda7e16aad606f66 (diff) | |
Use logging instead of print
Diffstat (limited to 'src/ui/book_entries.py')
| -rw-r--r-- | src/ui/book_entries.py | 5 |
1 files changed, 4 insertions, 1 deletions
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] |
