Description: Convert errors to future warnings Origin: upstream Bug-Debian: https://bugs.debian.org/850025 Bug-Ubuntu: https://launchpad.net/bugs/1665598 Forwarded: not-needed Last-Update: 2017-02-17 --- python-crypto-2.6.1.orig/src/block_template.c +++ python-crypto-2.6.1/src/block_template.c @@ -172,14 +172,14 @@ ALGnew(PyObject *self, PyObject *args, P } if (IVlen != 0 && mode == MODE_ECB) { - PyErr_Format(PyExc_ValueError, "ECB mode does not use IV"); - return NULL; + PyErr_WarnEx(PyExc_FutureWarning, "ECB mode does not use IV", 1); + IVlen = 0; } if (IVlen != 0 && mode == MODE_CTR) { - PyErr_Format(PyExc_ValueError, - "CTR mode needs counter parameter, not IV"); - return NULL; + PyErr_WarnEx(PyExc_FutureWarning, + "CTR mode needs counter parameter, not IV", 1); + IVlen = 0; } if (IVlen != BLOCK_SIZE && mode != MODE_ECB && mode != MODE_CTR) {