pyrabbit
pyrabbit copied to clipboard
Printing api URL disturbs target application
Method HTTPClient.do_call() (http.py, line 101) unconditionally echoes url. I use pyrabbit in an agent which catches and parses stdout. Echoed url causes error since is unexpected by the agent.
I see two possible solutions:
- The
urlis a debug message and thus it shall be removed. - The
urlprinting is useful somehow. Then the client class shall have optionsilent=False. If set to true, theurlwon't be echoed.
Ok. Now I see there are already several merge requests for this bug. The least intrusive from jofusa.
Can you merge that please?
+1, please :)
+1
+1
+1
Hi I'm still having this issue with the latest pip install of pyrabbit (1.1.0). Everytime I use the client it prints the url, when I use "pip install -U git+https://github.com/bkjones/pyrabbit.git" it removes this issue but I then get;
Traceback (most recent call last):
File "messages.py", line 13, in
This appear when trying to run a very basic code ?
from pyrabbit.api import Client
cl = Client('localhost:15672', 'guest', 'guest') all_queue_names = [str(q['name']) for q in cl.get_queues()]
any help would be greatly appreciated
+1
This is fixed in master but not latest v1.1.0 release https://github.com/bkjones/pyrabbit/blob/v1.1.0/pyrabbit/http.py#L101
I'm redirecting stdout to /dev/null as a workaround >/dev/null
+1
I fork and update module. Welcome https://github.com/deslum/pyrabbit2