mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
17 lines
335 B
Python
17 lines
335 B
Python
![]() |
"""PyKd test heplers/wrappers"""
|
||
|
|
||
|
import pykd
|
||
|
|
||
|
class ContextCallIt:
|
||
|
"""Context manager/with statement"""
|
||
|
def __init__(self, callIt):
|
||
|
self.callIt = callIt
|
||
|
|
||
|
def __enter__(self):
|
||
|
return self
|
||
|
|
||
|
def __exit__(self, exc_type, exc_value, exc_tb):
|
||
|
try: self.callIt()
|
||
|
except: pass
|
||
|
|