From 7b99f7d50ec41d2c44db3bbf760c6c1099a95ea2 Mon Sep 17 00:00:00 2001 From: annapoorna-s-alt Date: Tue, 17 Dec 2024 07:23:40 +0000 Subject: [PATCH] CRAYSAT-1945: Fix traceback error of session checks in CFS v2 --- CHANGELOG.md | 6 ++++++ sat/cli/bootsys/service_activity.py | 31 +++++++++++++++-------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d6e1211..e9475f38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.33.7] - 2024-12-18 + +### Fixed +- Fixed the traceback error encountered during session checks in CFS v2 + when using a smaller page size. + ## [3.33.6] - 2024-12-12 ### Added diff --git a/sat/cli/bootsys/service_activity.py b/sat/cli/bootsys/service_activity.py index 7e4da1e3..fdd3c4d9 100644 --- a/sat/cli/bootsys/service_activity.py +++ b/sat/cli/bootsys/service_activity.py @@ -386,23 +386,24 @@ def get_active_sessions(self): cfs_client = CFSClientBase.get_cfs_client(SATSession(), get_config_value('cfs.api_version')) try: sessions = cfs_client.get_sessions() - except (APIError, ValueError) as err: - raise self.get_err(str(err)) - cfs_session_fields = [ - self.id_field_name, - 'status.session.status', - 'status.session.startTime', - 'status.session.succeeded', - 'status.session.job' - ] + cfs_session_fields = [ + self.id_field_name, + 'status.session.status', + 'status.session.startTime', + 'status.session.succeeded', + 'status.session.job' + ] - return [ - get_new_ordered_dict(session, cfs_session_fields, MISSING_VALUE) - for session in sessions - # Possible values are 'pending', 'running', or 'complete' - if get_val_by_path(session, 'status.session.status') != 'complete' - ] + return [ + get_new_ordered_dict(session, cfs_session_fields, MISSING_VALUE) + for session in sessions + # Possible values are 'pending', 'running', or 'complete' + if get_val_by_path(session, 'status.session.status') != 'complete' + ] + + except APIError as err: + raise self.get_err(str(err)) class FirmwareActivityChecker(ServiceActivityChecker):