diff --git a/share/templates.d/99-generic/appliance/libvirt.tmpl b/share/templates.d/99-generic/appliance/libvirt.tmpl index a739e635..b6ffc613 100644 --- a/share/templates.d/99-generic/appliance/libvirt.tmpl +++ b/share/templates.d/99-generic/appliance/libvirt.tmpl @@ -9,7 +9,7 @@ -%for disk, letter in zip(disks, xrange(97, 123)): +%for disk, letter in zip(disks, range(97, 123)): %endfor diff --git a/src/pylorax/creator.py b/src/pylorax/creator.py index 3a5fa029..72b1a09e 100644 --- a/src/pylorax/creator.py +++ b/src/pylorax/creator.py @@ -155,7 +155,7 @@ def make_appliance(disk_img, name, template, outfile, networks=None, ram=1024, log.info("Calculating SHA256 checksum of %s", disk_img) sha256 = hashlib.sha256() - with open(disk_img) as f: + with open(disk_img, "rb") as f: while True: data = f.read(1024**2) if not data: