MCPcopy Create free account
hub / github.com/CScorza/IntelOSINT / _safe_obj

Method _safe_obj

IntelOSINT.py:15801–15811  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

15799 return str(v).strip() or "N/A"
15800
15801 def _safe_obj(v):
15802 if v is None:
15803 return "N/A"
15804 if isinstance(v, (str, int, float, bool)):
15805 return str(v)
15806 try:
15807 if isinstance(v, (list, tuple, dict)):
15808 return json.dumps(v, ensure_ascii=False)
15809 return str(v)
15810 except Exception:
15811 return "N/A"
15812
15813 def _collect_social_urls(data):
15814 if not isinstance(data, dict):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected