From: Peter Mikus Date: Mon, 26 Mar 2018 08:27:22 +0000 (+0200) Subject: FIX: Catch exeption in start-testcase X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=commitdiff_plain;h=f788b5aacec85be2c9097b5eb6a473fdebbf22a4 FIX: Catch exeption in start-testcase 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 --- diff --git a/resources/tools/virl/bin/start-testcase b/resources/tools/virl/bin/start-testcase index ce47378188..9e63f8da92 100755 --- a/resources/tools/virl/bin/start-testcase +++ b/resources/tools/virl/bin/start-testcase @@ -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)