Changeset 1546 for pykota/trunk/bin
- Timestamp:
- 06/18/04 15:34:49 (20 years ago)
- Location:
- pykota/trunk/bin
- Files:
-
- 7 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r1542 r1546 24 24 # 25 25 # $Log$ 26 # Revision 1.64 2004/06/18 13:34:46 jalet 27 # Now all tracebacks include PyKota's version number 28 # 26 29 # Revision 1.63 2004/06/17 13:26:50 jalet 27 30 # Better exception handling code … … 252 255 import time 253 256 254 from pykota.tool import PyKotaFilterOrBackend, PyKotaToolError 257 from pykota.tool import PyKotaFilterOrBackend, PyKotaToolError, crashed 255 258 from pykota.config import PyKotaConfigError 256 259 from pykota.storage import PyKotaStorageError … … 645 648 return retcode 646 649 647 def crashed(message) :648 """Minimal crash method."""649 import traceback650 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 657 650 if __name__ == "__main__" : 658 651 # This is a CUPS backend, we should act and die like a CUPS backend -
pykota/trunk/bin/edpykota
r1526 r1546 24 24 # 25 25 # $Log$ 26 # Revision 1.75 2004/06/18 13:34:47 jalet 27 # Now all tracebacks include PyKota's version number 28 # 26 29 # Revision 1.74 2004/06/07 18:43:40 jalet 27 30 # Fixed over-verbose exits when displaying help or version number … … 267 270 268 271 from pykota import version 269 from pykota.tool import PyKotaTool, PyKotaToolError 272 from pykota.tool import PyKotaTool, PyKotaToolError, crashed 270 273 from pykota.config import PyKotaConfigError 271 274 from pykota.storage import PyKotaStorageError … … 704 707 editor.crashed("edpykota failed") 705 708 except : 706 pass709 crashed("edpykota failed") 707 710 retcode = -1 708 711 -
pykota/trunk/bin/pkhint
r1526 r1546 24 24 # 25 25 # $Log$ 26 # Revision 1.11 2004/06/18 13:34:48 jalet 27 # Now all tracebacks include PyKota's version number 28 # 26 29 # Revision 1.10 2004/06/07 18:43:40 jalet 27 30 # Fixed over-verbose exits when displaying help or version number … … 65 68 66 69 from pykota import version 67 from pykota.tool import PyKotaTool, PyKotaToolError70 from pykota.tool import PyKotaTool, PyKotaToolError, crashed 68 71 from pykota.config import PyKotaConfigError 69 72 from pykota.storage import PyKotaStorageError … … 280 283 manager.crashed("pkhint failed") 281 284 except : 282 pass285 crashed("pkhint failed") 283 286 retcode = -1 284 287 -
pykota/trunk/bin/pkprinters
r1526 r1546 24 24 # 25 25 # $Log$ 26 # Revision 1.11 2004/06/18 13:34:48 jalet 27 # Now all tracebacks include PyKota's version number 28 # 26 29 # Revision 1.10 2004/06/07 18:43:40 jalet 27 30 # Fixed over-verbose exits when displaying help or version number … … 63 66 64 67 from pykota import version 65 from pykota.tool import PyKotaTool, PyKotaToolError 68 from pykota.tool import PyKotaTool, PyKotaToolError, crashed 66 69 from pykota.config import PyKotaConfigError 67 70 from pykota.storage import PyKotaStorageError … … 269 272 manager.crashed("pkprinters failed") 270 273 except : 271 pass274 crashed("pkprinters failed") 272 275 retcode = -1 273 276 -
pykota/trunk/bin/pykotme
r1526 r1546 24 24 # 25 25 # $Log$ 26 # Revision 1.12 2004/06/18 13:34:49 jalet 27 # Now all tracebacks include PyKota's version number 28 # 26 29 # Revision 1.11 2004/06/07 18:43:40 jalet 27 30 # Fixed over-verbose exits when displaying help or version number … … 72 75 73 76 from pykota import version 74 from pykota.tool import PyKotaTool, PyKotaToolError 77 from pykota.tool import PyKotaTool, PyKotaToolError, crashed 75 78 from pykota.config import PyKotaConfigError 76 79 from pykota.storage import PyKotaStorageError … … 200 203 sender.crashed("pykotme failed") 201 204 except : 202 pass205 crashed("pykotme failed") 203 206 retcode = -1 204 207 -
pykota/trunk/bin/repykota
r1526 r1546 24 24 # 25 25 # $Log$ 26 # Revision 1.49 2004/06/18 13:34:49 jalet 27 # Now all tracebacks include PyKota's version number 28 # 26 29 # Revision 1.48 2004/06/07 18:43:41 jalet 27 30 # Fixed over-verbose exits when displaying help or version number … … 189 192 190 193 from pykota import version 191 from pykota.tool import PyKotaTool, PyKotaToolError 194 from pykota.tool import PyKotaTool, PyKotaToolError, crashed 192 195 from pykota.config import PyKotaConfigError 193 196 from pykota.storage import PyKotaStorageError … … 322 325 reportTool.crashed("repykota failed") 323 326 except : 324 pass327 crashed("repykota failed") 325 328 retcode = -1 326 329 -
pykota/trunk/bin/warnpykota
r1526 r1546 24 24 # 25 25 # $Log$ 26 # Revision 1.29 2004/06/18 13:34:49 jalet 27 # Now all tracebacks include PyKota's version number 28 # 26 29 # Revision 1.28 2004/06/07 18:43:41 jalet 27 30 # Fixed over-verbose exits when displaying help or version number … … 121 124 122 125 from pykota import version 123 from pykota.tool import PyKotaTool, PyKotaToolError 126 from pykota.tool import PyKotaTool, PyKotaToolError, crashed 124 127 from pykota.config import PyKotaConfigError 125 128 from pykota.storage import PyKotaStorageError … … 261 264 sender.crashed("warnpykota failed") 262 265 except : 263 pass266 crashed("warnpykota failed") 264 267 retcode = -1 265 268