From 825fe2a614c1508f05091b5dd7c71ecff3859bfe Mon Sep 17 00:00:00 2001
From: Nikos Skalkotos <skalkoto@grnet.gr>
Date: Fri, 15 Jun 2012 12:03:50 +0300
Subject: [PATCH] Open snapshot in binary mode before uploading

---
 image_creator/main.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/image_creator/main.py b/image_creator/main.py
index af8f28e..2f0bbb0 100644
--- a/image_creator/main.py
+++ b/image_creator/main.py
@@ -249,7 +249,7 @@ def image_creator():
             if options.upload:
                 out.output("Uploading image to pithos:")
                 kamaki = Kamaki(options.account, options.token, out)
-                with open(snapshot) as f:
+                with open(snapshot, 'rb') as f:
                     uploaded_obj = kamaki.upload(f, size, options.upload,
                                             "(1/4)  Calculating block hashes",
                                             "(2/4)  Uploading missing blocks")
-- 
GitLab