[Python-checkins] cpython: Fix formatting of preset values for exception messages in _lzmamodule.c.

nadeem.vawda python-checkins at python.org
Sun May 6 13:42:41 CEST 2012


http://hg.python.org/cpython/rev/02374060397b
changeset:   76788:02374060397b
user:        Nadeem Vawda <nadeem.vawda at gmail.com>
date:        Sun May 06 13:35:47 2012 +0200
summary:
  Fix formatting of preset values for exception messages in _lzmamodule.c.

files:
  Modules/_lzmamodule.c |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Modules/_lzmamodule.c b/Modules/_lzmamodule.c
--- a/Modules/_lzmamodule.c
+++ b/Modules/_lzmamodule.c
@@ -203,7 +203,7 @@
 
     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 @@
         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);

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list