debian/bin/abiupdate.py: Update logging.

svn path=/dists/trunk/linux-2.6/; revision=7019
This commit is contained in:
Bastian Blank 2006-07-15 15:18:20 +00:00
parent b1a23577ca
commit 61742ae0f5
1 changed files with 7 additions and 6 deletions

View File

@ -17,6 +17,7 @@ class main(object):
override_flavour = None
def __init__(self):
self.log = sys.stdout.write
self.source = "linux-2.6"
self.version = "2.6.17"
self.abiname = "1"
@ -34,7 +35,7 @@ class main(object):
import tempfile
self.dir = tempfile.mkdtemp(prefix = 'abiupdate')
try:
print "Retreive config"
self.log("Retreive config\n")
config = self.get_config()
if self.override_arch:
arches = [self.override_arch]
@ -130,16 +131,16 @@ class main(object):
config_entry = config[('base', arch, subarch, flavour)]
if not config_entry.get('modules', True):
return
print "Updating ABI for arch %s, subarch %s, flavour %s" % (arch, subarch, flavour)
self.log("Updating ABI for arch %s, subarch %s, flavour %s: " % (arch, subarch, flavour))
try:
abi = self.get_abi(arch, subarch, flavour)
self.save_abi(abi, arch, subarch, flavour)
print "Ok."
self.log("Ok.\n")
except KeyboardInterrupt:
raise
self.log("Interrupted!\n")
sys.exit(1)
except Exception, e:
print "FAILED!"
print e
self.log("FAILED! (%s)\n" % str(e))
if __name__ == '__main__':
main()()