]> granicus.if.org Git - python/commitdiff
Better output for errors, and some progress reports.
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 5 Aug 2002 21:14:16 +0000 (21:14 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 5 Aug 2002 21:14:16 +0000 (21:14 +0000)
Handle the two modules with non-standard scanner module names.

Mac/scripts/bgenall.py

index 8fe36aa5f90d12967be65c336f8395f84c390fad..6490265ebc2725dd0511e1b8509201139db524c1 100644 (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