Changeset 1546 for pykota/trunk/bin

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

Now all tracebacks include PyKota's version number

Location:
pykota/trunk/bin
Files:
7 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 
  • pykota/trunk/bin/edpykota

    r1526 r1546  
    2424# 
    2525# $Log$ 
     26# Revision 1.75  2004/06/18 13:34:47  jalet 
     27# Now all tracebacks include PyKota's version number 
     28# 
    2629# Revision 1.74  2004/06/07 18:43:40  jalet 
    2730# Fixed over-verbose exits when displaying help or version number 
     
    267270 
    268271from pykota import version 
    269 from pykota.tool import PyKotaTool, PyKotaToolError 
     272from pykota.tool import PyKotaTool, PyKotaToolError, crashed 
    270273from pykota.config import PyKotaConfigError 
    271274from pykota.storage import PyKotaStorageError 
     
    704707            editor.crashed("edpykota failed") 
    705708        except :     
    706             pass 
     709            crashed("edpykota failed") 
    707710        retcode = -1 
    708711 
  • pykota/trunk/bin/pkhint

    r1526 r1546  
    2424# 
    2525# $Log$ 
     26# Revision 1.11  2004/06/18 13:34:48  jalet 
     27# Now all tracebacks include PyKota's version number 
     28# 
    2629# Revision 1.10  2004/06/07 18:43:40  jalet 
    2730# Fixed over-verbose exits when displaying help or version number 
     
    6568 
    6669from pykota import version 
    67 from pykota.tool import PyKotaTool,PyKotaToolError 
     70from pykota.tool import PyKotaTool, PyKotaToolError, crashed 
    6871from pykota.config import PyKotaConfigError 
    6972from pykota.storage import PyKotaStorageError 
     
    280283            manager.crashed("pkhint failed") 
    281284        except :     
    282             pass 
     285            crashed("pkhint failed") 
    283286        retcode = -1 
    284287 
  • pykota/trunk/bin/pkprinters

    r1526 r1546  
    2424# 
    2525# $Log$ 
     26# Revision 1.11  2004/06/18 13:34:48  jalet 
     27# Now all tracebacks include PyKota's version number 
     28# 
    2629# Revision 1.10  2004/06/07 18:43:40  jalet 
    2730# Fixed over-verbose exits when displaying help or version number 
     
    6366 
    6467from pykota import version 
    65 from pykota.tool import PyKotaTool, PyKotaToolError 
     68from pykota.tool import PyKotaTool, PyKotaToolError, crashed 
    6669from pykota.config import PyKotaConfigError 
    6770from pykota.storage import PyKotaStorageError 
     
    269272            manager.crashed("pkprinters failed") 
    270273        except :     
    271             pass 
     274            crashed("pkprinters failed") 
    272275        retcode = -1 
    273276 
  • pykota/trunk/bin/pykotme

    r1526 r1546  
    2424# 
    2525# $Log$ 
     26# Revision 1.12  2004/06/18 13:34:49  jalet 
     27# Now all tracebacks include PyKota's version number 
     28# 
    2629# Revision 1.11  2004/06/07 18:43:40  jalet 
    2730# Fixed over-verbose exits when displaying help or version number 
     
    7275 
    7376from pykota import version 
    74 from pykota.tool import PyKotaTool, PyKotaToolError 
     77from pykota.tool import PyKotaTool, PyKotaToolError, crashed 
    7578from pykota.config import PyKotaConfigError 
    7679from pykota.storage import PyKotaStorageError 
     
    200203            sender.crashed("pykotme failed") 
    201204        except :     
    202             pass 
     205            crashed("pykotme failed") 
    203206        retcode = -1 
    204207 
  • pykota/trunk/bin/repykota

    r1526 r1546  
    2424# 
    2525# $Log$ 
     26# Revision 1.49  2004/06/18 13:34:49  jalet 
     27# Now all tracebacks include PyKota's version number 
     28# 
    2629# Revision 1.48  2004/06/07 18:43:41  jalet 
    2730# Fixed over-verbose exits when displaying help or version number 
     
    189192 
    190193from pykota import version 
    191 from pykota.tool import PyKotaTool, PyKotaToolError 
     194from pykota.tool import PyKotaTool, PyKotaToolError, crashed 
    192195from pykota.config import PyKotaConfigError 
    193196from pykota.storage import PyKotaStorageError 
     
    322325            reportTool.crashed("repykota failed") 
    323326        except :     
    324             pass 
     327            crashed("repykota failed") 
    325328        retcode = -1 
    326329 
  • pykota/trunk/bin/warnpykota

    r1526 r1546  
    2424# 
    2525# $Log$ 
     26# Revision 1.29  2004/06/18 13:34:49  jalet 
     27# Now all tracebacks include PyKota's version number 
     28# 
    2629# Revision 1.28  2004/06/07 18:43:41  jalet 
    2730# Fixed over-verbose exits when displaying help or version number 
     
    121124 
    122125from pykota import version 
    123 from pykota.tool import PyKotaTool, PyKotaToolError 
     126from pykota.tool import PyKotaTool, PyKotaToolError, crashed 
    124127from pykota.config import PyKotaConfigError 
    125128from pykota.storage import PyKotaStorageError 
     
    261264            sender.crashed("warnpykota failed") 
    262265        except :     
    263             pass 
     266            crashed("warnpykota failed") 
    264267        retcode = -1 
    265268