[cmor] 11/13: Fix for CMORError; missing bit from orig
Alastair McKinstry
mckinstry at moszumanska.debian.org
Thu Apr 20 10:37:03 UTC 2017
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository cmor.
commit fd0c07cf6d6a4bdda6555e1c6d7c5c2ef9b5e7bf
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Tue Dec 20 14:39:28 2016 +0000
Fix for CMORError; missing bit from orig
---
debian/patches/python3.patch | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch
index 2d9c0c4..e8be04d 100644
--- a/debian/patches/python3.patch
+++ b/debian/patches/python3.patch
@@ -2722,7 +2722,7 @@ Index: cmor-3.2.1/Src/_cmormodule.c
if( coords_obj == Py_None ) {
coord_vals = NULL;
-@@ -1030,10 +1053,59 @@ static PyMethodDef MyExtractMethods[] =
+@@ -1030,10 +1053,56 @@ static PyMethodDef MyExtractMethods[] =
{NULL, NULL} /*sentinel */
};
@@ -2770,18 +2770,13 @@ Index: cmor-3.2.1/Src/_cmormodule.c
+ PyObject *module = Py_InitModule("_cmor", MyExtractMethods);
+#endif
import_array( );
-- CMORError = PyErr_NewException("_cmor.CMORError", NULL, NULL);
-- PyModule_AddObject(cmor_module, "CMORError", CMORError);
+
+ if (module == NULL)
+ INITERROR;
+ struct module_state *st = GETSTATE(module);
+
-+ st->error = PyErr_NewException("_cmor.Error", NULL, NULL);
-+ if (st->error == NULL) {
-+ Py_DECREF(module);
-+ INITERROR;
-+ }
+ CMORError = PyErr_NewException("_cmor.CMORError", NULL, NULL);
+ PyModule_AddObject(cmor_module, "CMORError", CMORError);
+
+#if PY_MAJOR_VERSION >= 3
+ return module;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cmor.git
More information about the debian-science-commits
mailing list