Skip to content

Commit 9e1f9e0

Browse files
committed
fix: Backport handle when the announce response has no fields
Signed-off-by: Ferenc Géczi <[email protected]>
1 parent de6f039 commit 9e1f9e0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

instana/agent/host.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ def announce(self, discovery):
202202
logger.debug("announce: response is not JSON: (%s)", raw_json)
203203
return None
204204

205+
if not hasattr(payload, 'get'):
206+
logger.debug("announce: response payload has no fields: (%s)", payload)
207+
return None
208+
205209
if not payload.get('pid'):
206210
logger.debug("announce: response payload has no pid: (%s)", payload)
207211
return None

0 commit comments

Comments
 (0)