Update system.py

This commit is contained in:
SpudGunMan
2024-12-12 14:25:40 -08:00
parent d8233bc9e2
commit 63d1f84887
+1 -1
View File
@@ -1036,7 +1036,7 @@ async def handleSentinel(deviceID=1):
if handleSentinel_loop >= sentry_holdoff and handleSentinel_spotted != enemySpotted:
# check the positionMetadata for nodeID and get metadata
if positionMetadata and closest_nodes[0]['id'] in positionMetadata:
if closest_nodes and positionMetadata and closest_nodes[0]['id'] in positionMetadata:
metadata = positionMetadata[closest_nodes[0]['id']]
if metadata.get('precisionBits') is not None:
resolution = metadata.get('precisionBits')