python/aqmp: fix ConnectError string method
authorJohn Snow <jsnow@redhat.com>
Thu, 11 Nov 2021 14:37:16 +0000 (09:37 -0500)
committerJohn Snow <jsnow@redhat.com>
Tue, 16 Nov 2021 19:26:36 +0000 (14:26 -0500)
commit25de7f50121f251c45d111582d786db7ce0768d3
tree49b303cf2f5d14b3e497a6d1084e3f9ef3ce0007
parentf26bd6ff21df2f1d155ca17eef360423b706ab7f
python/aqmp: fix ConnectError string method

When ConnectError is used to wrap an Exception that was initialized
without an error message, we are treated to a traceback with a rubbish
line like this:

... ConnectError: Failed to establish session:

Correct this to use the name of an exception as a fallback message:

... ConnectError: Failed to establish session: EOFError

Better!

Signed-off-by: John Snow <jsnow@redhat.com>
Reported-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-id: 20211111143719.2162525-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
python/qemu/aqmp/protocol.py