Skip to content

Commit

Permalink
image-fuzzer: Write bytes instead of string to image file
Browse files Browse the repository at this point in the history
This is necessary for Python 3 compatibility.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20191016192430.25098-3-ehabkost@redhat.com
Message-Id: <20191016192430.25098-3-ehabkost@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
ehabkost authored and stefanhaRH committed Nov 5, 2019
1 parent 60d3af5 commit c314e50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/image-fuzzer/qcow2/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def write(self, filename):
rounded = (size + self.cluster_size - 1) & ~(self.cluster_size - 1)
if rounded > size:
image_file.seek(rounded - 1)
image_file.write("\0")
image_file.write(b'\x00')
image_file.close()

@staticmethod
Expand Down

0 comments on commit c314e50

Please sign in to comment.