/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/cethread.py

  • Committer: Richard Wilbur
  • Date: 2016-02-04 19:07:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6618.
  • Revision ID: richard.wilbur@gmail.com-20160204190728-p0zvfii6zase0fw7
Update COPYING.txt from the original http://www.gnu.org/licenses/gpl-2.0.txt  (Only differences were in whitespace.)  Thanks to Petr Stodulka for pointing out the discrepancy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import sys
20
20
import threading
21
21
 
22
 
from .sixish import (
23
 
    reraise,
24
 
)
25
 
 
26
22
 
27
23
class CatchingExceptionThread(threading.Thread):
28
24
    """A thread that keeps track of exceptions.
47
43
        self.ignored_exceptions = None # see set_ignored_exceptions
48
44
        self.lock = threading.Lock()
49
45
 
 
46
    # compatibility thunk for python-2.4 and python-2.5...
 
47
    if sys.version_info < (2, 6):
 
48
        name = property(threading.Thread.getName, threading.Thread.setName)
 
49
 
50
50
    def set_sync_event(self, event):
51
51
        """Set the ``sync_event`` event used to synchronize exception catching.
52
52
 
146
146
            if (self.ignored_exceptions is None
147
147
                or not self.ignored_exceptions(exc_value)):
148
148
                # Raise non ignored exceptions
149
 
                reraise(exc_class, exc_value, exc_tb)
 
149
                raise exc_class, exc_value, exc_tb
150
150
 
151
151
    def pending_exception(self):
152
152
        """Raise the caught exception.