diff options
Diffstat (limited to 'ranger/applications.py')
-rw-r--r-- | ranger/applications.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ranger/applications.py b/ranger/applications.py index d71170c7..4c329a05 100644 --- a/ranger/applications.py +++ b/ranger/applications.py @@ -68,10 +68,14 @@ def run(*args, **kw): return process else: - if fm.ui: fm.ui.suspend() - p = Popen(args, **popen_kw) - waitpid_no_intr(p.pid) - if fm.ui: fm.ui.initialize() + if fm.ui: + fm.ui.suspend() + try: + p = Popen(args, **popen_kw) + waitpid_no_intr(p.pid) + finally: + if fm.ui: + fm.ui.initialize() return p def spawn(command, fm=None, suspend=True, wait=True): |