Changeset 28f4adb in mainline for tools/mktmpfs.py


Ignore:
Timestamp:
2010-11-02T11:13:36Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4687a26c, e06ef614
Parents:
458619f7
git-author:
Vojtech Horky <> (2010-11-02 11:13:36)
git-committer:
Martin Decky <martin@…> (2010-11-02 11:13:36)
Message:

update scripts for compatibility with Python 3 (thx Vojtech Horky and Martin Sucha)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/mktmpfs.py

    r458619f7 r28f4adb  
    6666def usage(prname):
    6767        "Print usage syntax"
    68         print prname + " <PATH> <IMAGE>"
     68        print(prname + " <PATH> <IMAGE>")
    6969
    7070def recursion(root, outf):
     
    8585                        outf.write(dentry.pack())
    8686                       
    87                         inf = file(canon, "r")
     87                        inf = open(canon, "rb")
    8888                        rd = 0;
    8989                        while (rd < size):
     
    116116        path = os.path.abspath(sys.argv[1])
    117117        if (not os.path.isdir(path)):
    118                 print "<PATH> must be a directory"
     118                print("<PATH> must be a directory")
    119119                return
    120120       
    121         outf = file(sys.argv[2], "w")
     121        outf = open(sys.argv[2], "wb")
    122122       
    123123        header = xstruct.create(HEADER)
Note: See TracChangeset for help on using the changeset viewer.