We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd83797 commit 3efa8c4Copy full SHA for 3efa8c4
networking_mlnx/eswitchd/eswitch_daemon.py
@@ -80,15 +80,20 @@ def _handle_msg(self):
80
if msg:
81
data = jsonutils.loads(msg)
82
83
- msg = None
+ result = {
84
+ "status": "FAIL",
85
+ "action": data.get("action", "UNKNOWN"),
86
+ "reason": "UNKNOWN"
87
+ }
88
if data:
89
try:
90
result = self.dispatcher.handle_msg(data)
- msg = jsonutils.dumps(result)
91
except Exception as e:
92
LOG.exception("Exception during message handling - %s", e)
- msg = jsonutils.dumps(str(e))
- sender.send_string(msg)
93
+ result["reason"] = str(e)
94
+
95
+ msg = jsonutils.dumps(result)
96
+ sender.send_string(msg)
97
98
def daemon_loop(self):
99
LOG.info("Daemon Started!")
0 commit comments