FIX: Catch exeption in start-testcase 56/11356/2
authorPeter Mikus <pmikus@cisco.com>
Mon, 26 Mar 2018 08:27:22 +0000 (10:27 +0200)
committerDave Wallace <dwallacelf@gmail.com>
Mon, 26 Mar 2018 20:08:14 +0000 (20:08 +0000)
Catch all exceptions by default if removing scratch directory is not
successful. This prevents further confusion about NFS permissions as
this is not the root cause of script failure.

Change-Id: I0f775bb38e98cf69b4ce277b6e0dda4dad0a8732
Signed-off-by: Peter Mikus <pmikus@cisco.com>
resources/tools/virl/bin/start-testcase

index ce47378..9e63f8d 100755 (executable)
@@ -386,7 +386,7 @@ def main():
                                auth=(args.username, args.password))
             try:
                 shutil.rmtree(scratch_directory)
-            except shutil.Error:
+            except:
                 print_to_stderr("ERROR: Removing scratch directory")
             print "{}".format(session_id)
         sys.exit(1)
@@ -424,7 +424,7 @@ def main():
                                auth=(args.username, args.password))
             try:
                 shutil.rmtree(scratch_directory)
-            except shutil.Error:
+            except:
                 print_to_stderr("ERROR: Removing scratch directory")
             print "{}".format(session_id)
         sys.exit(1)
@@ -499,7 +499,7 @@ def main():
                                auth=(args.username, args.password))
             try:
                 shutil.rmtree(scratch_directory)
-            except shutil.Error:
+            except:
                 print_to_stderr("ERROR: Removing scratch directory")
             print "{}".format(session_id)
         sys.exit(1)