Show
Ignore:
Timestamp:
11/29/07 16:47:33 (9 months ago)
Author:
tziade@…
Message:

fixed exit code

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • eggchecker/src/eggchecker/__init__.py

    r198 r200  
    6969 
    7070         
     71        exit = False 
     72 
    7173        for dirname in os.listdir(top_dir): 
    7274            if not os.path.isdir(dirname): 
     
    7678            try: 
    7779                run_tests(os.path.join(top_dir, dirname)) 
    78             except SystemExit: 
     80            except SystemExit, e: 
    7981                # we want to catch sys.exit  
    80                 pass 
     82                if e.code: 
     83                    exit = e.code 
    8184 
     85        # if one test failed, returninf the failure exit code  
     86        sys.exit(exit) 
     87