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