/pypy/module/thread/error.py
Python | 9 lines | 7 code | 2 blank | 0 comment | 0 complexity | aa0ddba06b17e5829027064290a84867 MD5 | raw file
- from pypy.interpreter.error import OperationError
- class Cache:
- def __init__(self, space):
- self.w_error = space.new_exception_class("thread.error")
- def wrap_thread_error(space, msg):
- w_error = space.fromcache(Cache).w_error
- return OperationError(w_error, space.wrap(msg))