From 1ab83d4a6ba36a1d5858304da3bd9cd704bfd3d8 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Tue, 10 May 2016 19:11:05 +0000 Subject: [PATCH] Get out of binary mode --- client/update_grub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/update_grub.py b/client/update_grub.py index 9d4b2b6..e3014a8 100755 --- a/client/update_grub.py +++ b/client/update_grub.py @@ -32,7 +32,7 @@ class GrubUpdater(object): def Update(self): grub_dir = os.path.join(self._boot_dir, 'grub') - with tempfile.NamedTemporaryFile(dir=grub_dir, delete=False) as fh: + with tempfile.NamedTemporaryFile('w', dir=grub_dir, delete=False) as fh: current = os.readlink(os.path.join(self._image_dir, 'current')) fh.write("""