]> sigrok.org Git - sigrok-util.git/blobdiff - source/new-driver
new-driver: put the cleanup part in a finally block
[sigrok-util.git] / source / new-driver
index 81f40699ada296e03a5855031189744e0101445f..33b717745b5c1ec958690b25a921e348481c7761 100755 (executable)
@@ -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