Show More
@@ -137,14 +137,16 b' class cg1unpacker(object):' | |||||
137 | _grouplistcount = 1 # One list of files after the manifests |
|
137 | _grouplistcount = 1 # One list of files after the manifests | |
138 |
|
138 | |||
139 | def __init__(self, fh, alg, extras=None): |
|
139 | def __init__(self, fh, alg, extras=None): | |
140 |
if alg |
|
140 | if alg is None: | |
141 | alg = None # get more modern without breaking too much |
|
141 | alg = 'UN' | |
142 |
if not |
|
142 | if alg not in util.compengines.supportedbundletypes: | |
143 | raise error.Abort(_('unknown stream compression type: %s') |
|
143 | raise error.Abort(_('unknown stream compression type: %s') | |
144 | % alg) |
|
144 | % alg) | |
145 | if alg == 'BZ': |
|
145 | if alg == 'BZ': | |
146 | alg = '_truncatedBZ' |
|
146 | alg = '_truncatedBZ' | |
147 | self._stream = util.decompressors[alg](fh) |
|
147 | ||
|
148 | compengine = util.compengines.forbundletype(alg) | |||
|
149 | self._stream = compengine.decompressorreader(fh) | |||
148 | self._type = alg |
|
150 | self._type = alg | |
149 | self.extras = extras or {} |
|
151 | self.extras = extras or {} | |
150 | self.callback = None |
|
152 | self.callback = None |
General Comments 0
You need to be logged in to leave comments.
Login now