Пример #1
0
 def GetRemoteMachineAvatar(self, request, context):
     path = os.path.join(GLib.get_home_dir(), ".face")
     if os.path.exists(path):
         return transfers.load_file_in_chunks(path)
     else:
         context.abort(code=grpc.StatusCode.NOT_FOUND,
                       details='.face file not found!')
Пример #2
0
    def GetRemoteMachineAvatar(self, request, context):
        logging.debug("Server RPC: GetRemoteMachineAvatar from '%s'" %
                      request.readable_name)

        path = os.path.join(GLib.get_home_dir(), ".face")
        if os.path.exists(path):
            return transfers.load_file_in_chunks(path)
        else:
            context.abort(code=grpc.StatusCode.NOT_FOUND,
                          details='.face file not found!')