def request_type ( self ) : if self . static and not self . uses_request : return getattr ( xenon_pb2 , 'Empty' ) if not self . uses_request : return None return getattr ( xenon_pb2 , self . request_name )
python 'nonetype' object has no attribute 'xenapi'
Retrieve the type of the request by fetching it from xenon . proto . xenon_pb2 .
def request_type(self):
        """Retrieve the type of the request, by fetching it from
        `xenon.proto.xenon_pb2`."""
        if self.static and not self.uses_request:
            return getattr(xenon_pb2, 'Empty')

        if not self.uses_request:
            return None

        return getattr(xenon_pb2, self.request_name)