diff --git a/scripts/buildrom.py b/scripts/buildrom.py index 0499049c..48bfc177 100755 --- a/scripts/buildrom.py +++ b/scripts/buildrom.py @@ -7,8 +7,6 @@ import sys, struct -from python23compat import as_bytes - def alignpos(pos, alignbytes): mask = alignbytes - 1 return (pos + mask) & ~mask @@ -31,7 +29,7 @@ def main(): count = len(data) # Pad to a 512 byte boundary - data += as_bytes("\0") * (alignpos(count, 512) - count) + data += b"\0" * (alignpos(count, 512) - count) count = len(data) # Check if a pci header is present @@ -42,7 +40,7 @@ def main(): # Fill in size field; clear checksum field blocks = struct.pack(' -# -# This file may be distributed under the terms of the GNU GPLv3 license. - -import sys - -if (sys.version_info > (3, 0)): - def as_bytes(str): - return bytes(str, "ASCII") -else: - def as_bytes(str): - return str