Here is scenario how to reproduce:
- Open connection a queue manager, keep it;
- Go to your queue manager and stop it, so that connection get broken;
- Close connection in the Python app.
It will cause exception:
Exception ignored in: <function QueueManager.__del__ at 0x7f3134006d40>
Traceback (most recent call last):
File "/home/akirillo/mqgit/agents/mq-agents/src/mq-mcp-server/.venv/lib/python3.13/site-packages/ibmmq/mqqmgr.py", line 64, in __del__
self.disconnect()
File "/home/akirillo/mqgit/agents/mq-agents/src/mq-mcp-server/.venv/lib/python3.13/site-packages/ibmmq/mqqmgr.py", line 408, in disconnect
mqlog.trace_exit("qmgr:disconnect", ep=2, rc=rv[2])
IndexError: tuple index out of range
The problem is that rv tuple has 2 values - COMP code and REASON. But the code does rv[2], which is out of range.
mqlog.trace_exit("qmgr:disconnect", ep=2, rc=rv[2])
Here is scenario how to reproduce:
It will cause exception:
The problem is that
rvtuple has 2 values - COMP code and REASON. But the code doesrv[2], which is out of range.