##// END OF EJS Templates
bundle2: introduce an ``_initparams`` method...
Pierre-Yves David -
r21608:3cb96ca9 default
parent child Browse files
Show More
@@ -706,6 +706,11 b' class unbundlepart(unpackermixin):'
706 706 data = self._fromheader(struct.calcsize(format))
707 707 return _unpack(format, data)
708 708
709 def _initparams(self, mandatoryparams, advisoryparams):
710 """internal function to setup all logic related parameters"""
711 self.mandatoryparams = mandatoryparams
712 self.advisoryparams = advisoryparams
713
709 714 def _readheader(self):
710 715 """read the header and setup the object"""
711 716 typesize = self._unpackheader(_fparttypesize)[0]
@@ -732,8 +737,7 b' class unbundlepart(unpackermixin):'
732 737 advparams = []
733 738 for key, value in advsizes:
734 739 advparams.append((self._fromheader(key), self._fromheader(value)))
735 self.mandatoryparams = manparams
736 self.advisoryparams = advparams
740 self._initparams(manparams, advparams)
737 741 ## part payload
738 742 def payloadchunks():
739 743 payloadsize = self._unpack(_fpayloadsize)[0]
General Comments 0
You need to be logged in to leave comments. Login now