Changeset 8fb1bf82 in mainline for tools/mkhord.py
- Timestamp:
- 2010-11-25T13:42:50Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8df8415
- Parents:
- a93d79a (diff), eb667613 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/mkhord.py
ra93d79a r8fb1bf82 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.