##// END OF EJS Templates
bundle2: split parameter retrieval and processing...
Pierre-Yves David -
r26541:d40029b4 default
parent child Browse files
Show More
@@ -657,15 +657,23 b' class unbundle20(unpackermixin):'
657 657 raise error.BundleValueError('negative bundle param size: %i'
658 658 % paramssize)
659 659 if paramssize:
660 for p in self._readexact(paramssize).split(' '):
661 p = p.split('=', 1)
662 p = [urllib.unquote(i) for i in p]
663 if len(p) < 2:
664 p.append(None)
665 self._processparam(*p)
666 params[p[0]] = p[1]
660 params = self._readexact(paramssize)
661 params = self._processallparams(params)
667 662 return params
668 663
664 def _processallparams(self, paramsblock):
665 """"""
666 params = {}
667 for p in paramsblock.split(' '):
668 p = p.split('=', 1)
669 p = [urllib.unquote(i) for i in p]
670 if len(p) < 2:
671 p.append(None)
672 self._processparam(*p)
673 params[p[0]] = p[1]
674 return params
675
676
669 677 def _processparam(self, name, value):
670 678 """process a parameter, applying its effect if needed
671 679
General Comments 0
You need to be logged in to leave comments. Login now