On 04/17/2013 07:39 PM, Mike Qiu wrote:
Sometimes this will lead an error, So before unlink the file
check if it is real exist.
Signed-off-by: Mike Qiu <[email protected]>
Works for me
Acked-by: Feng Yang <[email protected]>
---
client/test.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/client/test.py b/client/test.py
index 988b502..2d3fd53 100644
--- a/client/test.py
+++ b/client/test.py
@@ -92,7 +92,8 @@ class test(common_test.base_test):
"""
if self.crash_handling_enabled:
# Remove the debugdir info file
- os.unlink(self.debugdir_tmp_file)
+ if os.path.isfile(self.debugdir_tmp_file):
+ os.unlink(self.debugdir_tmp_file)
# Restore the core pattern backup
try:
utils.open_write_close(self.pattern_file,
_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel