diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-03-18 20:26:31 +0100 |
---|---|---|
committer | lupoDharkael <izhe@hotmail.es> | 2024-03-21 10:29:57 +0100 |
commit | 8741b2e2724fabb25465c06c3a4f881d9aa28d67 (patch) | |
tree | 05d065a70a6d0b28c714047f6c111077827cc1c1 /src/virtual/qmp.py | |
parent | 167fd296343870a5e6f94eaba749bc7722d2e7cb (diff) |
src: change generic exception types to be more explicit
Replace exception types to be more explicit about the nature of
the error.
Improve the exception raising semantics by using the 'from' keyword,
this wraps an older exception into a new one so it is still considered
the same object.
Diffstat (limited to 'src/virtual/qmp.py')
-rw-r--r-- | src/virtual/qmp.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/virtual/qmp.py b/src/virtual/qmp.py index 5c8cf6a..96823d3 100644 --- a/src/virtual/qmp.py +++ b/src/virtual/qmp.py @@ -170,7 +170,7 @@ class QEMUMonitorProtocol(object): except socket.error as err: if err[0] == errno.EPIPE: return - raise socket.error(err) + raise socket.error(err) from err resp = self.__json_read() self.logger.debug("<<< %s", resp) return resp |