def gevent_monkey_patch_report ( self ) : try : import gevent . socket import socket if gevent . socket . socket is socket . socket : self . log ( "gevent monkey patching is active" ) return True else : self . notify_user ( "gevent monkey patching failed." ) except ImportError : self . notify_user ( "gevent is not installed, monkey patching failed." ) return False
python check if gevent monkey patch
Report effective gevent monkey patching on the logs .
def gevent_monkey_patch_report(self):
        """
        Report effective gevent monkey patching on the logs.
        """
        try:
            import gevent.socket
            import socket

            if gevent.socket.socket is socket.socket:
                self.log("gevent monkey patching is active")
                return True
            else:
                self.notify_user("gevent monkey patching failed.")
        except ImportError:
            self.notify_user("gevent is not installed, monkey patching failed.")
        return False