grr/server/grr_response_server/databases/mysql_utils.py
def Decorated(self, *args, **kw):  # pylint: disable=function-redefined
      """A function decorated by WithTransaction to receive a cursor."""
      cursor = kw.get("cursor", None)
      if cursor:
        return func(self, *args, **kw)

      def Closure(connection):
        with contextlib.closing(connection.cursor()) as cursor:
          new_kw = kw.copy()
          new_kw["cursor"] = cursor
          return func(self, *args, **new_kw)

      return self._RunInTransaction(Closure, readonly)
A function decorated by WithTransaction to receive a cursor.
A function decorated by WithTransaction to receive a cursor.
A function decorated by WithTransaction to receive a cursor .
def Decorated(self, *args, **kw):  
      cursor = kw.get("cursor", None)
      if cursor:
        return func(self, *args, **kw)
      def Closure(connection):
        with contextlib.closing(connection.cursor()) as cursor:
          new_kw = kw.copy()
          new_kw["cursor"] = cursor
          return func(self, *args, **new_kw)
      return self._RunInTransaction(Closure, readonly)
def Decorated ( self , * args , ** kw ) : cursor = kw . get ( "cursor" , None ) if cursor : return func ( self , * args , ** kw ) def Closure ( connection ) : with contextlib . closing ( connection . cursor ( ) ) as cursor : new_kw = kw . copy ( ) new_kw [ "cursor" ] = cursor return func ( self , * args , ** new_kw ) return self . _RunInTransaction ( Closure , readonly )
A function decorated by WithTransaction to receive a cursor.
A function decorated by WithTransaction to receive a cursor .
# pylint: disable=function-redefined """A function decorated by WithTransaction to receive a cursor."""
self