[Patches] define ThreadError exception in threading.py
Charles G Waldman
cgw@fnal.gov
Tue, 30 May 2000 12:42:48 -0500 (CDT)
The module threading.py can raise thread.error. If you use "import
threading", you still must "import thread" in order to be able to
catch thread.error. I think the exceptions raised by the threading
module should be defined within that module.
Index: Lib/threading.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/threading.py,v
retrieving revision 1.7
diff -c -r1.7 threading.py
*** Lib/threading.py 2000/02/29 00:10:24 1.7
--- Lib/threading.py 2000/05/30 17:39:25
***************
*** 18,23 ****
--- 18,24 ----
_start_new_thread = thread.start_new_thread
_allocate_lock = thread.allocate_lock
_get_ident = thread.get_ident
+ ThreadError = thread.error
del thread
_print_exc = traceback.print_exc
Disclaimer:
I confirm that, to the best of my knowledge and belief, this
contribution is free of any claims of third parties under
copyright, patent or other rights or interests ("claims"). To
the extent that I have any such claims, I hereby grant to CNRI a
nonexclusive, irrevocable, royalty-free, worldwide license to
reproduce, distribute, perform and/or display publicly, prepare
derivative versions, and otherwise use this contribution as part
of the Python software and its related documentation, or any
derivative versions thereof, at no cost to CNRI or its licensed
users, and to authorize others to do so.
I acknowledge that CNRI may, at its sole discretion, decide
whether or not to incorporate this contribution in the Python
software and its related documentation. I further grant CNRI
permission to use my name and other identifying information
provided to CNRI by me for use in connection with the Python
software and its related documentation.