diff --git a/kupfer/plugin/show_qrcode.py b/kupfer/plugin/show_qrcode.py index 1c90c94f..362cc52a 100644 --- a/kupfer/plugin/show_qrcode.py +++ b/kupfer/plugin/show_qrcode.py @@ -11,17 +11,20 @@ import io import tempfile from contextlib import closing -import typing as ty +from gettext import gettext as _ import qrcode + from gi.repository import GdkPixbuf, Gtk from kupfer import plugin_support from kupfer.obj import Action, FileLeaf, Leaf, TextLeaf from kupfer.ui import uiutils -if ty.TYPE_CHECKING: - from gettext import gettext as _ + +if not hasattr(qrcode, "QRCode"): + raise ImportError("missing (right) qrcode package") + __kupfer_settings__ = plugin_support.PluginSettings( {