Changes in tools/mkhord.py [8f2a852:28f4adb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/mkhord.py
r8f2a852 r28f4adb 27 27 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 # 29 29 30 """ 30 31 HORD encapsulator … … 51 52 def usage(prname): 52 53 "Print usage syntax" 53 print prname + " <ALIGNMENT> <FS_IMAGE> <HORD_IMAGE>"54 print(prname + " <ALIGNMENT> <FS_IMAGE> <HORD_IMAGE>") 54 55 55 56 def main(): … … 59 60 60 61 if (not sys.argv[1].isdigit()): 61 print "<ALIGNMENT> must be a number"62 print("<ALIGNMENT> must be a number") 62 63 return 63 64 64 65 align = int(sys.argv[1], 0) 65 66 if (align <= 0): 66 print "<ALIGNMENT> must be positive"67 print("<ALIGNMENT> must be positive") 67 68 return 68 69 69 70 fs_image = os.path.abspath(sys.argv[2]) 70 71 if (not os.path.isfile(fs_image)): 71 print "<FS_IMAGE> must be a file"72 print("<FS_IMAGE> must be a file") 72 73 return 73 74 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") 76 77 77 78 header = xstruct.create(HEADER)
Note:
See TracChangeset
for help on using the changeset viewer.