Skip to content

Commit 57cdac4

Browse files
committed
Raise a value error on bad compression level
1 parent a9e9aab commit 57cdac4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zlib_ng/zlib_ngmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1653,7 +1653,7 @@ ParallelCompress__new__(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16531653
Py_DECREF(self);
16541654
return NULL;
16551655
case Z_STREAM_ERROR:
1656-
PyErr_SetString(ZlibError, "Bad compression level");
1656+
PyErr_SetString(PyExc_ValueError, "Bad compression level");
16571657
Py_DECREF(self);
16581658
return NULL;
16591659
default:

0 commit comments

Comments
 (0)