##// END OF EJS Templates
bundle2: add a 'copy' method on parts...
Pierre-Yves David -
r24793:2ec89458 default
parent child Browse files
Show More
@@ -655,6 +655,15 b' class bundlepart(object):'
655 655 self._generated = None
656 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 667 # methods used to defines the part content
659 668 def __setdata(self, data):
660 669 if self._generated is not None:
General Comments 0
You need to be logged in to leave comments. Login now