Better output for errors, and some progress reports.

Handle the two modules with non-standard scanner module names.
This commit is contained in:
Jack Jansen 2002-08-05 21:14:16 +00:00
parent c4ff194bdd
commit 20417bcd18
1 changed files with 12 additions and 1 deletions

View File

@ -6,13 +6,24 @@ import string
def bgenone(dirname, shortname):
os.chdir(dirname)
print '%s:'%shortname
# Sigh, we don't want to lose CVS history, so two
# modules have funny names:
if shortname == 'carbonevt':
modulename = 'CarbonEvtscan'
elif shortname == 'ibcarbon':
modulename = 'IBCarbonscan'
else:
modulename = shortname + 'scan'
try:
m = __import__(shortname+'scan')
m = __import__(modulename)
except:
print "Error:", shortname, sys.exc_info()[1]
return 0
try:
m.main()
except:
print "Error:", shortname, sys.exc_info()[1]
return 0
return 1