From: parmentelat Date: Mon, 17 Dec 2018 13:47:43 +0000 (+0100) Subject: for python3, GetBootMedium needs to open image file as binary X-Git-Tag: plcapi-7.0-0~7 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=b69c8ae517a2249aec9690ce27c571b2f9f20c56 for python3, GetBootMedium needs to open image file as binary --- diff --git a/PLC/Methods/GetBootMedium.py b/PLC/Methods/GetBootMedium.py index d9fc671..9a4b3b8 100644 --- a/PLC/Methods/GetBootMedium.py +++ b/PLC/Methods/GetBootMedium.py @@ -602,7 +602,7 @@ class GetBootMedium(Method): self.cleantrash() return filename else: - with open(node_image) as feed: + with open(node_image, "rb") as feed: result = feed.read() self.trash.append(node_image) self.cleantrash()