Commit 5206a71f authored by Denis Bilenko's avatar Denis Bilenko

proc: remove deprecated trap_errors

parent 7132adc8
...@@ -467,6 +467,7 @@ class Source(object): ...@@ -467,6 +467,7 @@ class Source(object):
class Waiter(object): class Waiter(object):
# XXX: reuse Waiter from gevent and remove this one
def __init__(self): def __init__(self):
self.greenlet = None self.greenlet = None
...@@ -612,17 +613,7 @@ def spawn_link_exception(function, *args, **kwargs): ...@@ -612,17 +613,7 @@ def spawn_link_exception(function, *args, **kwargs):
return p return p
def trap_errors(errors, func, *args, **kwargs): # not specific to proc module
"""DEPRECATED; use wrap_errors"""
import warnings
warnings.warn("proc.trap_errors function is deprecated in favor of proc.wrap_errors class",
DeprecationWarning, stacklevel=2)
try:
return func(*args, **kwargs)
except errors, ex:
return ex
class wrap_errors(object): class wrap_errors(object):
"""Helper to make function return an exception, rather than raise it. """Helper to make function return an exception, rather than raise it.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment