Beispiel #1
0
        def munge_props(self, props):
                """See parent class for docstring."""

                # update path to remove any altroot
                altroot = self.__linked.altroot()
                props[li.PROP_PATH] = \
                    li.rm_altroot_path(props[li.PROP_PATH], altroot)
Beispiel #2
0
        def attach_child_inmemory(self, props, allow_relink):
                """See parent class for docstring."""

                # make sure this child doesn't already exist
                lin_list = [i[0] for i in self.get_child_list()]
                lin = props[li.PROP_NAME]
                assert lin not in lin_list or allow_relink

                # make a copy of the properties
                props = props.copy()

                # update path to remove any altroot
                altroot = self.__linked.altroot()
                props[li.PROP_PATH] = \
                    li.rm_altroot_path(props[li.PROP_PATH], altroot)

                # delete temporal properties
                props = li.rm_dict_ent(props, li.temporal_props)

                self.__img.cfg.linked_children[lin] = props