brisbane: groupcompress cleanups - part1

Stephen J. Turnbull stephen at xemacs.org
Tue Mar 31 12:01:15 BST 2009


Ian Clatworthy writes:
 > I've spent the day doing a code review of groupcompress,

A nit:


 > -        if self._compressor_name == 'lzma':
 > +        if self._compressor_name == 'zlib':
 > +            header = zlib.decompress(self._z_header)
 > +        else:
 > +            if self._compressor_name != 'lzma':
 > +                raise AssertionError("unknown compressor name %s" %
 > +                    (self._compressor_name,))
 >              header = pylzma.decompress(self._z_header)
 > -        else:
 > -            assert self._compressor_name == 'zlib'
 > -            header = zlib.decompress(self._z_header)

Wouldn't

        if self._compressor_name == 'lzma':
            header = pylzma.decompress(self._z_header)
        elif self._compressor_name == 'zlib':
            header = zlib.decompress(self._z_header)
        else:
            raise AssertionError("unknown compressor name %s" %
                (self._compressor_name,))

be clearer here?



More information about the bazaar mailing list