From: David Douard Date: Mon, 30 May 2016 20:00:45 +0000 (+0200) Subject: new-driver: put the cleanup part in a finally block X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-util.git;a=commitdiff_plain;h=e3f27bc0a0ee12c645171af295310540a3ef9f2c;ds=sidebyside new-driver: put the cleanup part in a finally block as it should be --- diff --git a/source/new-driver b/source/new-driver index 81f4069..33b7177 100755 --- a/source/new-driver +++ b/source/new-driver @@ -68,7 +68,8 @@ def new_driver(): make_patch(gitdir) except Exception as e: print(e) - shutil.rmtree(tmp) + finally: + shutil.rmtree(tmp) # add DRIVER and DRIVER2 entries to configure.ac