for python3, GetBootMedium needs to open image file as binary
authorparmentelat <thierry.parmentelat@inria.fr>
Mon, 17 Dec 2018 13:47:43 +0000 (14:47 +0100)
committerparmentelat <thierry.parmentelat@inria.fr>
Mon, 17 Dec 2018 13:47:43 +0000 (14:47 +0100)
PLC/Methods/GetBootMedium.py

index d9fc671..9a4b3b8 100644 (file)
@@ -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()