aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2018-03-26 10:27:22 +0200
committerDave Wallace <dwallacelf@gmail.com>2018-03-26 20:08:14 +0000
commitf788b5aacec85be2c9097b5eb6a473fdebbf22a4 (patch)
treed307f00367ffa9919dde38855a1c56b40ed94aa1
parent3bc59881071b80acf5127ba0d4c38344feaf5d95 (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>
-rwxr-xr-xresources/tools/virl/bin/start-testcase6
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)