From 01ac5f20b14d8d77a33600a382f9fcae733c3950 Mon Sep 17 00:00:00 2001 From: Charlie Bini <5003326+cbini@users.noreply.github.com> Date: Thu, 27 Jul 2023 21:00:42 +0000 Subject: [PATCH] fix return --- src/teamster/core/powerschool/sensors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/teamster/core/powerschool/sensors.py b/src/teamster/core/powerschool/sensors.py index a1b52ab5c9..a99ee682a4 100644 --- a/src/teamster/core/powerschool/sensors.py +++ b/src/teamster/core/powerschool/sensors.py @@ -103,10 +103,10 @@ def _sensor( # ) cursor[asset_key_string] = now.timestamp() + context.update_cursor(json.dumps(obj=cursor)) + finally: context.log.debug("Stopping SSH tunnel") ssh_tunnel.stop() - yield SensorResult(cursor=json.dumps(obj=cursor)) - return _sensor