Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-redfish for openSUSE:Factory checked in at 2025-02-03 21:44:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-redfish (Old) and /work/SRC/openSUSE:Factory/.python-redfish.new.2316 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-redfish" Mon Feb 3 21:44:42 2025 rev:19 rq:1242323 version:3.2.8 Changes: -------- --- /work/SRC/openSUSE:Factory/python-redfish/python-redfish.changes 2024-12-29 11:57:04.569252896 +0100 +++ /work/SRC/openSUSE:Factory/.python-redfish.new.2316/python-redfish.changes 2025-02-03 21:46:08.112982031 +0100 @@ -1,0 +2,7 @@ +Sun Feb 2 10:54:54 UTC 2025 - Martin Hauke <mar...@gmx.de> + +- Update to version 3.2.8 + * Updated 'dict' handling for responses without a body and 500 + responses with a non-JSON body to use an empty dictionary. + +------------------------------------------------------------------- Old: ---- redfish-3.2.7.tar.gz New: ---- redfish-3.2.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-redfish.spec ++++++ --- /var/tmp/diff_new_pack.X5fc7O/_old 2025-02-03 21:46:08.749008392 +0100 +++ /var/tmp/diff_new_pack.X5fc7O/_new 2025-02-03 21:46:08.753008558 +0100 @@ -1,8 +1,8 @@ # # spec file for package python-redfish # -# Copyright (c) 2024 SUSE LLC -# Copyright (c) 2020-2024, Martin Hauke <mar...@gmx.de> +# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2020-2025, Martin Hauke <mar...@gmx.de> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ Name: python-redfish -Version: 3.2.7 +Version: 3.2.8 Release: 0 Summary: Redfish Python Library License: BSD-3-Clause ++++++ redfish-3.2.7.tar.gz -> redfish-3.2.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-redfish-library-3.2.7/CHANGELOG.md new/python-redfish-library-3.2.8/CHANGELOG.md --- old/python-redfish-library-3.2.7/CHANGELOG.md 2024-12-24 01:50:21.000000000 +0100 +++ new/python-redfish-library-3.2.8/CHANGELOG.md 2025-01-24 22:11:24.000000000 +0100 @@ -1,5 +1,8 @@ # Change Log +## [3.2.8] - 2025-01-24 +- Updated 'dict' handling for responses without a body and 500 responses with a non-JSON body to use an empty dictionary + ## [3.2.7] - 2024-12-24 - Added JSON formatting of responses to debug logs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-redfish-library-3.2.7/setup.py new/python-redfish-library-3.2.8/setup.py --- old/python-redfish-library-3.2.7/setup.py 2024-12-24 01:50:21.000000000 +0100 +++ new/python-redfish-library-3.2.8/setup.py 2025-01-24 22:11:24.000000000 +0100 @@ -12,7 +12,7 @@ long_description = f.read() setup(name='redfish', - version='3.2.7', + version='3.2.8', description='Redfish Python Library', long_description=long_description, long_description_content_type='text/x-rst', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-redfish-library-3.2.7/src/redfish/__init__.py new/python-redfish-library-3.2.8/src/redfish/__init__.py --- old/python-redfish-library-3.2.7/src/redfish/__init__.py 2024-12-24 01:50:21.000000000 +0100 +++ new/python-redfish-library-3.2.8/src/redfish/__init__.py 2025-01-24 22:11:24.000000000 +0100 @@ -6,7 +6,7 @@ """ Redfish restful library """ __all__ = ['rest', 'ris', 'discovery', 'messages'] -__version__ = "3.2.7" +__version__ = "3.2.8" from redfish.rest.v1 import redfish_client from redfish.rest.v1 import AuthMethod diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-redfish-library-3.2.7/src/redfish/rest/v1.py new/python-redfish-library-3.2.8/src/redfish/rest/v1.py --- old/python-redfish-library-3.2.7/src/redfish/rest/v1.py 2024-12-24 01:50:21.000000000 +0100 +++ new/python-redfish-library-3.2.8/src/redfish/rest/v1.py 2025-01-24 22:11:24.000000000 +0100 @@ -249,8 +249,16 @@ def dict(self): """Property for accessing the data as an dict""" try: + if len(self.text) == 0: + # No response body; return empty dict instead to avoid exceptions + # No response bodies can be valid in many cases (especially 4XX and 5XX responses) + return {} return json.loads(self.text) except: + if self.status == 500: + # Make an allowance for 500 status codes + # Depending on the reason for the error, it's possible the web server may not be able to support Redfish handling + return {} str = "Service responded with invalid JSON at URI {}\n{}".format( self._rest_request.path, self.text) LOGGER.error(str)