We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ba492a commit d0b8563Copy full SHA for d0b8563
confluent_kafka/src/confluent_kafka.c
@@ -1575,6 +1575,7 @@ static PyObject *_init_cimpl (void) {
1575
Py_INCREF(&ConsumerType);
1576
PyModule_AddObject(m, "Consumer", (PyObject *)&ConsumerType);
1577
1578
+#if PY_VERSION_HEX >= 0x02070000
1579
KafkaException = PyErr_NewExceptionWithDoc(
1580
"cimpl.KafkaException",
1581
"Kafka exception that wraps the :py:class:`KafkaError` "
@@ -1584,6 +1585,9 @@ static PyObject *_init_cimpl (void) {
1584
1585
":py:class:`KafkaError` object\n"
1586
"\n",
1587
NULL, NULL);
1588
+#else
1589
+ KafkaException = PyErr_NewException("cimpl.KafkaException", NULL, NULL);
1590
+#endif
1591
Py_INCREF(KafkaException);
1592
PyModule_AddObject(m, "KafkaException", KafkaException);
1593
0 commit comments