diff options
Diffstat (limited to 'kafka/util.py')
-rw-r--r-- | kafka/util.py | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/kafka/util.py b/kafka/util.py index 9f65b81..ca1e531 100644 --- a/kafka/util.py +++ b/kafka/util.py @@ -65,12 +65,3 @@ class Dict(dict): See: https://docs.python.org/2/library/weakref.html """ pass - - -def try_method_on_system_exit(obj, method, *args, **kwargs): - def wrapper(_obj, _meth, *args, **kwargs): - try: - getattr(_obj, _meth)(*args, **kwargs) - except (ReferenceError, AttributeError): - pass - atexit.register(wrapper, weakref.proxy(obj), method, *args, **kwargs) |