

def _apply_monkey_patch(self):
    if isinstance(self.monkey, dict):
        gevent.monkey.patch_all(**self.monkey)
    elif original_report.monkey:
        gevent.monkey.patch_all()
    if self.monkey_greenlet_report:
        import logging
        original_report = gevent.hub.Hub.print_exception

        def print_exception(self, context, type, value, tb):
            try:
                logging.error(('Error in greenlet: %s' % str(context)), exc_info=(type, value, tb))
            finally:
                return original_report(self, context, type, value, tb)
        gevent.hub.Hub.print_exception = print_exception

dataset/ETHPy150Open gwik/geventdaemon/lib/geventdaemon.py GeventDaemonContext._apply_monkey_patch/VarMisuse@36/46 `self`->`original_report`