summaryrefslogtreecommitdiffstats
path: root/Modules/_lzmamodule.c
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2012-05-06 11:35:47 (GMT)
committerNadeem Vawda <nadeem.vawda@gmail.com>2012-05-06 11:35:47 (GMT)
commit54c74ece28d707176fa375ab65f5be229fc4db0a (patch)
treefb722ecd363b4e8308088f3108dd7e5d294cf3f9 /Modules/_lzmamodule.c
parentf1b34ee61bfadd5684566823f1f439c086ef7f55 (diff)
downloadcpython-54c74ece28d707176fa375ab65f5be229fc4db0a.zip
cpython-54c74ece28d707176fa375ab65f5be229fc4db0a.tar.gz
cpython-54c74ece28d707176fa375ab65f5be229fc4db0a.tar.bz2
Fix formatting of preset values for exception messages in _lzmamodule.c.
Diffstat (limited to 'Modules/_lzmamodule.c')
-rw-r--r--Modules/_lzmamodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_lzmamodule.c b/Modules/_lzmamodule.c
index a69377c..ece7290 100644
--- a/Modules/_lzmamodule.c
+++ b/Modules/_lzmamodule.c
@@ -203,7 +203,7 @@ parse_filter_spec_lzma(PyObject *spec)
if (lzma_lzma_preset(options, preset)) {
PyMem_Free(options);
- PyErr_Format(Error, "lzma_lzma_preset() failed for preset %#x", preset);
+ PyErr_Format(Error, "Invalid compression preset: %d", preset);
return NULL;
}
@@ -485,7 +485,7 @@ Compressor_init_alone(lzma_stream *lzs, uint32_t preset, PyObject *filterspecs)
lzma_options_lzma options;
if (lzma_lzma_preset(&options, preset)) {
- PyErr_Format(Error, "Invalid compression preset: %#x", preset);
+ PyErr_Format(Error, "Invalid compression preset: %d", preset);
return -1;
}
lzret = lzma_alone_encoder(lzs, &options);