show size even when image fits

svn path=/dists/trunk/linux-2.6/; revision=13156
This commit is contained in:
Martin Michlmayr 2009-03-17 17:35:04 +00:00
parent 3f198a60e5
commit 88657e0346
1 changed files with 4 additions and 4 deletions

View File

@ -144,13 +144,13 @@ class CheckImage(object):
value = int(value)
s = os.stat(image)
size = os.stat(image)[stat.ST_SIZE]
if s[stat.ST_SIZE] > value:
out.write('Image too large (%d > %d)! Refusing to continue.\n' % (s[stat.ST_SIZE], value))
if size > value:
out.write('Image too large (%d > %d)! Refusing to continue.\n' % (size, value))
return 1
out.write('Image fits (%d). Continuing.\n' % value)
out.write('Image fits (%d <= %d). Continuing.\n' % (size, value))
return 0