From acf837e5ac03f1aa4d20113abce2c73d809dc90e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 5 Mar 2021 11:32:26 -0500 Subject: [PATCH] Fix plain rom update of nextscale When zipfile checks for zip signatures, it does not guarantee seek position at end. Seek to the beginning explicitly after zipfile is done. Change-Id: I13d053576ba12ae7cd668d96179c9f435d0fa751 --- pyghmi/ipmi/oem/lenovo/nextscale.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyghmi/ipmi/oem/lenovo/nextscale.py b/pyghmi/ipmi/oem/lenovo/nextscale.py index 6bf55259..3934b6e6 100644 --- a/pyghmi/ipmi/oem/lenovo/nextscale.py +++ b/pyghmi/ipmi/oem/lenovo/nextscale.py @@ -712,6 +712,8 @@ class SMMClient(object): if data and hasattr(data, 'read'): if zipfile.is_zipfile(data): z = zipfile.ZipFile(data) + else: + data.seek(0) elif data is None and zipfile.is_zipfile(filename): z = zipfile.ZipFile(filename) if z: