def process_robot(self, json): #print('process robot', json['name']) robot = Robot(json) robot.process_action() self.db.robots.update({'name': robot.name, 'owner': robot.owner}, {'$set': robot.to_update()})