From 9faaa8e07e7a88657aabf1dee46404bf2e1b9d20 Mon Sep 17 00:00:00 2001 From: Uday Kiran Reddy Konda Date: Thu, 29 Feb 2024 18:49:42 +0530 Subject: [PATCH] Fixed AttributeError in ensure_iso_mount function of zhmc_partition Signed-off-by: Uday Kiran Reddy Konda --- docs/source/release_notes.rst | 2 ++ plugins/modules/zhmc_partition.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index 42ce5ead3..d48282ca6 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -46,6 +46,8 @@ Availability: `AutomationHub`_, `Galaxy`_, `GitHub`_ * Increased the minimum version of zhmcclient to 1.13.3 to pick up fixes and performance improvements. (related to issue #904) +* Fixed readable attribute error when ensuring ISO mounted onto the partition. (related to issue #932) + **Enhancements:** * Added a new make target 'end2end_show' to show the HMCs defined for end2end diff --git a/plugins/modules/zhmc_partition.py b/plugins/modules/zhmc_partition.py index b86922689..2da1bd6e8 100644 --- a/plugins/modules/zhmc_partition.py +++ b/plugins/modules/zhmc_partition.py @@ -2059,7 +2059,7 @@ def ensure_iso_mount(params, check_mode): try: with open(image_file, 'rb') as fp: if not check_mode: - image = fp.readall() + image = fp.read() except IOError as exc: raise ImageError( "Cannot open ISO image file {fn!r} for reading: {exc}".