From f788b5aacec85be2c9097b5eb6a473fdebbf22a4 Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Mon, 26 Mar 2018 10:27:22 +0200 Subject: 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 --- resources/tools/virl/bin/start-testcase | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'resources') 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) -- cgit 1.2.3-korg