Skip to content

Commit eab8c4b

Browse files
committed
fix error and indentation
1 parent 9688404 commit eab8c4b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/confluent_kafka/src/Producer.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,10 @@ static PyObject *Producer_topic_new (Handle *self, PyObject *args,
407407
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|O", kws, &topic, &conf))
408408
return NULL;
409409

410-
if (!PyDict_Check(conf))
410+
if (!PyDict_Check(conf)) {
411+
PyErr_SetString(PyExc_TypeError, "conf must be a dictionary or options");
411412
return NULL;
413+
}
412414

413415
topic_conf = rd_kafka_topic_conf_new();
414416
while (PyDict_Next(conf, &pos, &ko, &vo)) {
@@ -448,7 +450,7 @@ static PyObject *Producer_topic_new (Handle *self, PyObject *args,
448450
Py_XDECREF(vs8);
449451
Py_XDECREF(vs);
450452
Py_XDECREF(ks8);
451-
Py_DECREF(ks);
453+
Py_DECREF(ks);
452454
continue;
453455

454456
inner_err:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy