Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 20417bc

Browse files
committed
Better output for errors, and some progress reports.
Handle the two modules with non-standard scanner module names.
1 parent c4ff194 commit 20417bc

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

Mac/scripts/bgenall.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,24 @@
66

77
def bgenone(dirname, shortname):
88
os.chdir(dirname)
9+
print '%s:'%shortname
10+
# Sigh, we don't want to lose CVS history, so two
11+
# modules have funny names:
12+
if shortname == 'carbonevt':
13+
modulename = 'CarbonEvtscan'
14+
elif shortname == 'ibcarbon':
15+
modulename = 'IBCarbonscan'
16+
else:
17+
modulename = shortname + 'scan'
918
try:
10-
m = __import__(shortname+'scan')
19+
m = __import__(modulename)
1120
except:
21+
print "Error:", shortname, sys.exc_info()[1]
1222
return 0
1323
try:
1424
m.main()
1525
except:
26+
print "Error:", shortname, sys.exc_info()[1]
1627
return 0
1728
return 1
1829

0 commit comments

Comments
 (0)