Show More
@@ -655,6 +655,15 b' class bundlepart(object):' | |||||
655 | self._generated = None |
|
655 | self._generated = None | |
656 | self.mandatory = mandatory |
|
656 | self.mandatory = mandatory | |
657 |
|
657 | |||
|
658 | def copy(self): | |||
|
659 | """return a copy of the part | |||
|
660 | ||||
|
661 | The new part have the very same content but no partid assigned yet. | |||
|
662 | Parts with generated data cannot be copied.""" | |||
|
663 | assert not util.safehasattr(self.data, 'next') | |||
|
664 | return self.__class__(self.type, self._mandatoryparams, | |||
|
665 | self._advisoryparams, self._data, self.mandatory) | |||
|
666 | ||||
658 | # methods used to defines the part content |
|
667 | # methods used to defines the part content | |
659 | def __setdata(self, data): |
|
668 | def __setdata(self, data): | |
660 | if self._generated is not None: |
|
669 | if self._generated is not None: |
General Comments 0
You need to be logged in to leave comments.
Login now