diff --git a/src/cloud_what/_base_provider.py b/src/cloud_what/_base_provider.py index 6b0379d49a..304faf2925 100644 --- a/src/cloud_what/_base_provider.py +++ b/src/cloud_what/_base_provider.py @@ -366,7 +366,7 @@ def _debug_print_http_request(request: requests.PreparedRequest) -> None: print(colorize("Request headers:", COLOR.GREEN)) print(colorize(f"{request.headers}", COLOR.BLUE)) - if os.environ.get("SUBMAN_DEBUG_PRINT_REQUEST_BODY", "") and request.body is not None: + if os.environ.get("SUBMAN_DEBUG_PRINT_REQUEST_BODY", "") and hasattr(request, "body"): print(colorize("Request body:", COLOR.GREEN)) print(colorize(f"{request.body}", COLOR.YELLOW))