Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapt to ocrd>=2.17 logging #6

Merged
merged 1 commit into from
Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ocrd_browser/model/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
from ocrd_models import OcrdFile
from ocrd_models.ocrd_page_generateds import PcGtsType
from ocrd_models.constants import NAMESPACES as NS
from ocrd_utils import pushd_popd, getLogger
from ocrd_utils import pushd_popd
from ocrd_utils.constants import MIME_TO_EXT, MIMETYPE_PAGE
from . import DEFAULT_FILE_GROUP

from logging import getLogger
from typing import Optional, Tuple, List, Set, Union, cast, Callable, Any
from collections import OrderedDict
from pathlib import Path
Expand Down
2 changes: 2 additions & 0 deletions ocrd_browser/ui/window.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from gi.repository import Gtk, GdkPixbuf, Gio, GObject, GLib
from ocrd_models import OcrdFile
from ocrd_utils import initLogging

from ocrd_browser.model import Document
from ocrd_browser.view import ViewRegistry, View, ViewImages
Expand All @@ -23,6 +24,7 @@ class MainWindow(Gtk.ApplicationWindow):

def __init__(self, **kwargs: Any):
Gtk.ApplicationWindow.__init__(self, **kwargs)
initLogging()
# noinspection PyCallByClass,PyArgumentList
self.set_icon(GdkPixbuf.Pixbuf.new_from_resource("/org/readmachine/ocrd-browser/icons/icon.png"))
self.views: List[View] = []
Expand Down