Skip to content

Commit

Permalink
fix return value
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalzauberzeug committed Sep 24, 2024
1 parent 6538c50 commit 9dcde5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions field_friend/vision/zedxmini_camera/zedxmini_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ async def get_point(self, x, y) -> Point3d | None:
async with session.get(url, timeout=2.0) as response:
if response.status != 200:
self.log.warning(f"response.status: {response.status}")
return
return None
data = await response.json()
except aiohttp.ClientError as e:
self.log.error(f"Error capturing image: {str(e)}")
except asyncio.TimeoutError:
self.log.error("Request timed out")
if data is None:
return
return None
assert 'x' in data
assert 'y' in data
assert 'z' in data
Expand Down

0 comments on commit 9dcde5a

Please sign in to comment.