From 88657e0346a47c91949cca94ed18120131aaa079 Mon Sep 17 00:00:00 2001 From: Martin Michlmayr Date: Tue, 17 Mar 2009 17:35:04 +0000 Subject: [PATCH] show size even when image fits svn path=/dists/trunk/linux-2.6/; revision=13156 --- debian/bin/buildcheck.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/bin/buildcheck.py b/debian/bin/buildcheck.py index 991a52136..c65b8f658 100755 --- a/debian/bin/buildcheck.py +++ b/debian/bin/buildcheck.py @@ -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