Mercurial > hg > config
changeset 684:8b2787e98c01
STUB: python/gview.py
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sat, 17 May 2014 20:10:47 -0700 (2014-05-18) |
parents | ce95c61cb435 |
children | 3da85ac3c54f |
files | python/gview.py |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/python/gview.py Sat May 17 00:15:45 2014 -0700 +++ b/python/gview.py Sat May 17 20:10:47 2014 -0700 @@ -50,11 +50,12 @@ subprocess.check_call(command) assert os.path.exists(output) - if options.viewer: - subprocess.call([options.viewer, output]) - - if not options.output: - os.remove(output) + try: + if options.viewer: + subprocess.call([options.viewer, output]) + finally: + if not options.output: + os.remove(output) if __name__ == '__main__':