mirror of
https://github.com/python/cpython.git
synced 2025-09-01 06:28:36 +00:00
Fix formatting of preset values for exception messages in _lzmamodule.c.
This commit is contained in:
parent
f1b34ee61b
commit
54c74ece28
1 changed files with 2 additions and 2 deletions
|
@ -203,7 +203,7 @@ parse_filter_spec_lzma(PyObject *spec)
|
||||||
|
|
||||||
if (lzma_lzma_preset(options, preset)) {
|
if (lzma_lzma_preset(options, preset)) {
|
||||||
PyMem_Free(options);
|
PyMem_Free(options);
|
||||||
PyErr_Format(Error, "lzma_lzma_preset() failed for preset %#x", preset);
|
PyErr_Format(Error, "Invalid compression preset: %d", preset);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -485,7 +485,7 @@ Compressor_init_alone(lzma_stream *lzs, uint32_t preset, PyObject *filterspecs)
|
||||||
lzma_options_lzma options;
|
lzma_options_lzma options;
|
||||||
|
|
||||||
if (lzma_lzma_preset(&options, preset)) {
|
if (lzma_lzma_preset(&options, preset)) {
|
||||||
PyErr_Format(Error, "Invalid compression preset: %#x", preset);
|
PyErr_Format(Error, "Invalid compression preset: %d", preset);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
lzret = lzma_alone_encoder(lzs, &options);
|
lzret = lzma_alone_encoder(lzs, &options);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue