aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Guyonvarch2025-12-27 23:13:31 +0100
committerJoris Guyonvarch2025-12-27 23:13:31 +0100
commit93ab1ab45ad0cf8f2ae6cd148f6c8e4500f01b8f (patch)
tree63125e177cc288b2c83f7c575025025904c0b0ed
parentd8e68f19b2812573033dfbe8cda7e16aad606f66 (diff)
Use logging instead of print
-rw-r--r--src/ui/book_entries.py5
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]