new-driver: put the cleanup part in a finally block
authorDavid Douard <david.douard@logilab.fr>
Mon, 30 May 2016 20:00:45 +0000 (22:00 +0200)
committerUwe Hermann <uwe@hermann-uwe.de>
Thu, 9 Jun 2016 10:19:22 +0000 (12:19 +0200)
as it should be

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