Changeset 6582b36 in mainline for tools/mkuimage.py


Ignore:
Timestamp:
2012-04-01T07:13:03Z (12 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
81475250
Parents:
d9faae91
Message:

Make some scripts work with Python 3.

Arch Linux has already switched so "python" means version 3, so these
scripts don't run otherwise. Only the simplest fixes are made. Note that
automatic int-to-long conversion has existed since at least Python 2.4.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/mkuimage.py

    rd9faae91 r6582b36  
    140140        signed_crc = zlib.crc32(byteseq, 0)
    141141        if signed_crc < 0:
    142                 return (long(signed_crc) + (long(2) ** long(32))) # 2^32L
     142                return signed_crc + (1 << 32)
    143143        else:
    144144                return signed_crc
     
    148148def print_syntax(cmd):
    149149        print("syntax: " + cmd + " [<options>] <raw_image> <uImage>")
    150         print
     150        print()
    151151        print("\traw_image\tInput image name (raw binary data)")
    152152        print("\tuImage\t\tOutput uImage name (U-Boot image)")
    153         print
     153        print()
    154154        print("options:")
    155155        print("\t-name <name>\tImage name (default: 'Noname')")
Note: See TracChangeset for help on using the changeset viewer.