Exemple #1
0
 def _parse_existing_actor(self, netstream, actor_type, objects, propertymapper):
     properties = {}
     while netstream.read(BOOL):
         property_id = read_serialized_int(netstream,
                                           propertymapper.get_property_max_id(actor_type))
         property_name = objects[propertymapper.get_property_name(actor_type, property_id)]
         try:
             property_value = read_property_value(property_name, netstream)
         except PropertyParsingError as e:
             e.args += ({"Props_till_err": properties},)
             raise e
         properties[property_name] = property_value
     return properties
Exemple #2
0
 def _parse_existing_actor(self, netstream, actor_type, objects, propertymapper):
     properties = {}
     while netstream.read(BOOL):
         property_id = read_serialized_int(netstream,
                                           propertymapper.get_property_max_id(actor_type))
         property_name = objects[propertymapper.get_property_name(actor_type, property_id)]
         try:
             property_value = read_property_value(property_name, netstream)
         except PropertyParsingError as e:
             e.args += ({"Props_till_err": properties},)
             raise e
         properties[property_name] = property_value
     return properties
Exemple #3
0
    def _parse_existing_actor(self, actor, netstream, objects, propertymapper):
        actor['state'] = 'existing'
        actor_type = self._actor_alive[actor['id']]

        while netstream.read(BOOL):
            property_id = read_serialized_int(
                netstream, propertymapper.get_property_max_id(actor_type))
            property_name = objects[propertymapper.get_property_name(
                actor_type, property_id)]

            try:
                property_value = read_property_value(property_name, netstream)
            except PropertyParsingError as e:
                e.args += ({"Props_till_err": actor}, )

                raise e

            actor[property_name] = property_value

        return actor
    def _parse_existing_actor(self, actor, netstream, objects, propertymapper):
        actor['state'] = 'existing'
        actor_type = self._actor_alive[actor['id']]

        while netstream.read(BOOL):
            property_id = read_serialized_int(
                netstream,
                propertymapper.get_property_max_id(actor_type)
            )
            property_name = objects[propertymapper.get_property_name(actor_type, property_id)]

            try:
                property_value = read_property_value(property_name, netstream)
            except PropertyParsingError as e:
                e.args += ({
                    "Props_till_err": actor
                },)

                raise e

            actor[property_name] = property_value

        return actor