Show
Ignore:
Timestamp:
06/18/04 15:34:49 (20 years ago)
Author:
jalet
Message:

Now all tracebacks include PyKota's version number

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r1542 r1546  
    2424# 
    2525# $Log$ 
     26# Revision 1.64  2004/06/18 13:34:46  jalet 
     27# Now all tracebacks include PyKota's version number 
     28# 
    2629# Revision 1.63  2004/06/17 13:26:50  jalet 
    2730# Better exception handling code 
     
    252255import time 
    253256 
    254 from pykota.tool import PyKotaFilterOrBackend, PyKotaToolError 
     257from pykota.tool import PyKotaFilterOrBackend, PyKotaToolError, crashed 
    255258from pykota.config import PyKotaConfigError 
    256259from pykota.storage import PyKotaStorageError 
     
    645648        return retcode     
    646649     
    647 def crashed(message) :     
    648     """Minimal crash method.""" 
    649     import traceback 
    650     lines = [] 
    651     for line in traceback.format_exception(*sys.exc_info()) : 
    652         lines.extend([l for l in line.split("\n") if l]) 
    653     msg = "ERROR: ".join(["%s\n" % l for l in ([message] + lines)]) 
    654     sys.stderr.write(msg) 
    655     sys.stderr.flush() 
    656  
    657650if __name__ == "__main__" :     
    658651    # This is a CUPS backend, we should act and die like a CUPS backend