Changeset 28f4adb in mainline for tools/mkhord.py
- Timestamp:
- 2010-11-02T11:13:36Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/mkhord.py
r458619f7 r28f4adb 52 52 def usage(prname): 53 53 "Print usage syntax" 54 print prname + " <ALIGNMENT> <FS_IMAGE> <HORD_IMAGE>"54 print(prname + " <ALIGNMENT> <FS_IMAGE> <HORD_IMAGE>") 55 55 56 56 def main(): … … 60 60 61 61 if (not sys.argv[1].isdigit()): 62 print "<ALIGNMENT> must be a number"62 print("<ALIGNMENT> must be a number") 63 63 return 64 64 65 65 align = int(sys.argv[1], 0) 66 66 if (align <= 0): 67 print "<ALIGNMENT> must be positive"67 print("<ALIGNMENT> must be positive") 68 68 return 69 69 70 70 fs_image = os.path.abspath(sys.argv[2]) 71 71 if (not os.path.isfile(fs_image)): 72 print "<FS_IMAGE> must be a file"72 print("<FS_IMAGE> must be a file") 73 73 return 74 74 75 inf = file(fs_image, "rb")76 outf = file(sys.argv[3], "wb")75 inf = open(fs_image, "rb") 76 outf = open(sys.argv[3], "wb") 77 77 78 78 header = xstruct.create(HEADER)
Note:
See TracChangeset
for help on using the changeset viewer.