diff options
Diffstat (limited to 'mpm/python/usrp_mpm/mpmutils.py')
-rw-r--r-- | mpm/python/usrp_mpm/mpmutils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mpm/python/usrp_mpm/mpmutils.py b/mpm/python/usrp_mpm/mpmutils.py index a0716d1da..f7e4e3be1 100644 --- a/mpm/python/usrp_mpm/mpmutils.py +++ b/mpm/python/usrp_mpm/mpmutils.py @@ -182,6 +182,8 @@ def lock_guard(lockable): lockable -- Must have a .lock() and .unlock() method """ lockable.lock() - yield - lockable.unlock() + try: + yield + finally: + lockable.unlock() |