コード例 #1
0
import logging


from errors import OverloadError
from pvf import queries
from logging_setup import LogglyAdapter
from PyZ3950.zoom import ConnectionError


module_logger = LogglyAdapter(logging.getLogger('overload'), None)


def z3950_query_manager(target, meta, matchpoint):
    """
    Oversees queries send to Sierra Z3950
    args:
        api_name
        meta obj
        matchpoint
    return:
        query result
    """
    module_logger.debug('Making new Z3950 request to: {}'.format(
        target['host']))
    try:
        result = queries.query_runner(
            'Z3950', target, meta, matchpoint)
        return result
    except ConnectionError:
        module_logger.error('Z3950 Connection error on host {}'.format(
            target['host']))
コード例 #2
0
import tkMessageBox

# from errors import OverloadError
from gui_utils import BusyManager
from logging_setup import format_traceback, LogglyAdapter
from manager import (
    get_bib,
    count_total,
    persist_choice,
    create_marc_file,
    set_oclc_holdings,
    get_batch_criteria_record,
)
from setup_dirs import USER_DATA, MY_DOCS

mlogger = LogglyAdapter(logging.getLogger("overload"), None)


class W2SReport(tk.Frame):
    """
    GUI for verification and selection of records retrieved
    using Worldcat2Sierra module
    """
    def __init__(self, parent):
        self.parent = parent
        tk.Frame.__init__(self, self.parent, background="white")
        self.top = tk.Toplevel(self, background="white")
        self.cur_manager = BusyManager(self)
        self.top.iconbitmap("./icons/report.ico")
        self.top.title("W2S Report & Selection")