diff options
author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2011-09-11 20:38:11 (GMT) |
---|---|---|
committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2011-09-11 20:38:11 (GMT) |
commit | 249ab5e8d1452ab7bc43b0f1e1221e0065d2e52d (patch) | |
tree | 6ebff12b415d2245e019902ec858a4b946098282 /Lib/bz2.py | |
parent | c92f6226d7e83a93a8ab535d3e964ae50c2c5272 (diff) | |
download | cpython-249ab5e8d1452ab7bc43b0f1e1221e0065d2e52d.zip cpython-249ab5e8d1452ab7bc43b0f1e1221e0065d2e52d.tar.gz cpython-249ab5e8d1452ab7bc43b0f1e1221e0065d2e52d.tar.bz2 |
BZ2File now uses the compresslevel argument given by the caller,
instead of ignoring it and always using a compression level of 9.
Diffstat (limited to 'Lib/bz2.py')
-rw-r--r-- | Lib/bz2.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -75,11 +75,11 @@ class BZ2File(io.BufferedIOBase): elif mode in ("w", "wb"): mode = "wb" mode_code = _MODE_WRITE - self._compressor = BZ2Compressor() + self._compressor = BZ2Compressor(compresslevel) elif mode in ("a", "ab"): mode = "ab" mode_code = _MODE_WRITE - self._compressor = BZ2Compressor() + self._compressor = BZ2Compressor(compresslevel) else: raise ValueError("Invalid mode: {!r}".format(mode)) |