~pythonregexp2.7/python/issue2636-11

« back to all changes in this revision

Viewing changes to Lib/dummy_thread.py

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-21 13:47:31 UTC
  • mfrom: (39021.1.404 Regexp-2.7)
  • mto: This revision was merged to the branch mainline in revision 39030.
  • Revision ID: darklord@timehorse.com-20080921134731-rudomuzeh1b2tz1y
Merged in changes from the latest python source snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
           'interrupt_main', 'LockType']
18
18
 
19
19
import traceback as _traceback
20
 
import warnings
21
20
 
22
21
class error(Exception):
23
22
    """Dummy implementation of thread.error."""
104
103
        aren't triggered and throw a little fit.
105
104
 
106
105
        """
107
 
        if waitflag is None:
 
106
        if waitflag is None or waitflag:
108
107
            self.locked_status = True
109
 
            return None
110
 
        elif not waitflag:
 
108
            return True
 
109
        else:
111
110
            if not self.locked_status:
112
111
                self.locked_status = True
113
112
                return True
114
113
            else:
115
114
                return False
116
 
        else:
117
 
            self.locked_status = True
118
 
            return True
119
115
 
120
116
    __enter__ = acquire
121
117