diff options
author | Peter Mikus <pmikus@cisco.com> | 2018-03-26 10:27:22 +0200 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2018-03-26 20:08:14 +0000 |
commit | f788b5aacec85be2c9097b5eb6a473fdebbf22a4 (patch) | |
tree | d307f00367ffa9919dde38855a1c56b40ed94aa1 /resources/tools/virl | |
parent | 3bc59881071b80acf5127ba0d4c38344feaf5d95 (diff) |
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 <pmikus@cisco.com>
Diffstat (limited to 'resources/tools/virl')
-rwxr-xr-x | resources/tools/virl/bin/start-testcase | 6 |
1 files changed, 3 insertions, 3 deletions
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) |