Changes in tools/mkhord.py [8f2a852:28f4adb] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/mkhord.py

    r8f2a852 r28f4adb  
    2727# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2828#
     29
    2930"""
    3031HORD encapsulator
     
    5152def usage(prname):
    5253        "Print usage syntax"
    53         print prname + " <ALIGNMENT> <FS_IMAGE> <HORD_IMAGE>"
     54        print(prname + " <ALIGNMENT> <FS_IMAGE> <HORD_IMAGE>")
    5455
    5556def main():
     
    5960       
    6061        if (not sys.argv[1].isdigit()):
    61                 print "<ALIGNMENT> must be a number"
     62                print("<ALIGNMENT> must be a number")
    6263                return
    6364       
    6465        align = int(sys.argv[1], 0)
    6566        if (align <= 0):
    66                 print "<ALIGNMENT> must be positive"
     67                print("<ALIGNMENT> must be positive")
    6768                return
    6869       
    6970        fs_image = os.path.abspath(sys.argv[2])
    7071        if (not os.path.isfile(fs_image)):
    71                 print "<FS_IMAGE> must be a file"
     72                print("<FS_IMAGE> must be a file")
    7273                return
    7374       
    74         inf = file(fs_image, "rb")
    75         outf = file(sys.argv[3], "wb")
     75        inf = open(fs_image, "rb")
     76        outf = open(sys.argv[3], "wb")
    7677       
    7778        header = xstruct.create(HEADER)
Note: See TracChangeset for help on using the changeset viewer.