don't shutdown logging, just flush the fd

This commit is contained in:
Mike Bonnet 2010-08-04 01:12:51 -04:00
parent d6825052ec
commit d5f85269b9

View file

@ -655,12 +655,13 @@ def incremental_upload(server, handler):
def flunk(server, logfile):
"""do the right thing when a build fails"""
global logfd
logging.getLogger('koji.vm').error('error running build', exc_info=True)
exc_info = sys.exc_info()
tb = ''.join(traceback.format_exception(*exc_info))
if server is not None:
try:
logging.shutdown()
logfd.flush()
upload_file(server, os.path.dirname(logfile),
os.path.basename(logfile))
except: