Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/gtk/util.py')
-rw-r--r--test/gtk/util.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/gtk/util.py b/test/gtk/util.py
index 06a949c5e..a6c2d0ca2 100644
--- a/test/gtk/util.py
+++ b/test/gtk/util.py
@@ -1,3 +1,4 @@
+import logging
from pathlib import Path
from gi.repository import Gdk
@@ -14,10 +15,10 @@ def get_gajim_dir() -> Path:
def load_style(filename: str, priority: CSSPriority) -> None:
path = get_gajim_dir() / 'data' / 'style' / filename
try:
- with open(str(path), 'r', encoding='utf8') as file:
+ with open(str(path), encoding='utf8') as file:
css = file.read()
- except Exception as exc:
- print(exc)
+ except Exception:
+ logging.exception('')
return
provider = Gtk.CssProvider()
provider.load_from_data(bytes(css.encode('utf-8')))