def _load_handler(self, scheme, skip_lazy=False):
    path = self._schemes[scheme]
    try:
        dhcls = load_object(path)
        if (skip_lazy and getattr(dhcls, 'lazy', True)):
            return None
        dh = create_instance(objcls=dhcls, settings=self._crawler.settings, crawler=self._crawler)
    except NotConfigured as ex:
        self._notconfigured[scheme] = str(ex)
        return None
    except Exception as ex:
        logger.error('Loading "%(clspath)s" for scheme "%(scheme)s"', {'clspath': path, 'scheme': scheme}, exc_info=True, extra={'crawler': self._crawler})
        self._notconfigured[scheme] = str(ex)
        return None
    else:
        self._handlers[scheme] = dh
        return dh
def _load_handler(self, scheme, skip_lazy=False):
    path = self._schemes[scheme]
    try:
        dhcls = load_object(path)
        if (skip_lazy and getattr(dhcls, 'lazy', True)):
            return None
        dh = create_instance(objcls=dhcls, settings=self._crawler.settings, crawler=self._crawler)
    except NotConfigured as ex:
        self._notconfigured[scheme] = str(ex)
        return None
    except Exception as ex:
        logger.error('Loading "%(clspath)s" for scheme "%(scheme)s"', {'clspath': path, 'scheme': scheme}, exc_info=True, extra={'crawler': self._crawler})
        self._notconfigured[scheme] = str(ex)
        return None
    else:
        self._handlers[scheme] = dh
        return dh