Skip to content

Instantly share code, notes, and snippets.

@kwloafman
Created September 21, 2011 19:36
Show Gist options
  • Save kwloafman/1233068 to your computer and use it in GitHub Desktop.
Save kwloafman/1233068 to your computer and use it in GitHub Desktop.
Patch file for pylibrabbitmq
diff --git a/pylibrabbitmq/__init__.py b/pylibrabbitmq/__init__.py
index fb7d438..369df40 100644
--- a/pylibrabbitmq/__init__.py
+++ b/pylibrabbitmq/__init__.py
@@ -54,8 +54,8 @@ class Channel(object):
def flow(self, enabled):
pass
- def basic_get(self, queue="", noack=False):
- frame = self.connection._basic_get(queue, noack, self.channel_id)
+ def basic_get(self, queue="", no_ack=False):
+ frame = self.connection._basic_get(queue, no_ack, self.channel_id)
if frame is not None:
return(Message(frame["body"],
frame["properties"],
diff --git a/pylibrabbitmq/_rabbitmqmodule.c b/pylibrabbitmq/_rabbitmqmodule.c
index 96083a0..947dce0 100644
--- a/pylibrabbitmq/_rabbitmqmodule.c
+++ b/pylibrabbitmq/_rabbitmqmodule.c
@@ -998,18 +998,18 @@ static int PyRabbitMQ_wait_timeout(int sockfd, double timeout) {
static PyObject *PyRabbitMQ_Connection_basic_get(PyRabbitMQ_Connection *self,
PyObject *args, PyObject *kwargs) {
char *queue = NULL;
- int noack = 0;
+ int no_ack = 0;
int channel = 0;
amqp_rpc_reply_t reply;
- static char *kwlist[] = {"queue", "noack", "channel", NULL};
+ static char *kwlist[] = {"queue", "no_ack", "channel", NULL};
if (PyArg_ParseTupleAndKeywords(args, kwargs, "sii", kwlist,
- &queue, &noack, &channel)) {
+ &queue, &no_ack, &channel)) {
Py_BEGIN_ALLOW_THREADS;
reply = amqp_basic_get(self->conn, channel,
amqp_cstring_bytes(queue),
- noack);
+ no_ack);
Py_END_ALLOW_THREADS;
if (!PyRabbitMQ_handle_amqp_error(reply,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment