~raharper/curtin/trunk.lp1641661

Viewing all changes in revision 423.3.1.

  • Committer: Scott Moser
  • Date: 2016-09-19 16:52:10 UTC
  • mto: This revision was merged to the branch mainline in revision 426.
  • Revision ID: smoser@ubuntu.com-20160919165210-1mlkhnc5vy7a3yc9
bytes2human: fix for values larger than 32 bit int on 32 bit python2.

This fixes a bug in bytes2human when running on 32 bit system.
the bytes2human tests would fail because we were not testing for a
type 'long' and integers over 32 bit get converted to long.

    $ uname -m
    i386
    $ python2 -c 'print(type(1024 ** 3 * 10))'
    <type 'long'>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: