From d44876215f13b287e354b5e9209b17ecd67eb72c Mon Sep 17 00:00:00 2001
From: Wainer Vandelli <Wainer.Vandelli@cern.ch>
Date: Fri, 24 Jun 2011 12:15:53 +0000
Subject: [PATCH] Do not delete if DB information is not available (and db is)

---
 Script/DeleteThread.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Script/DeleteThread.py b/Script/DeleteThread.py
index 92153a2..37930a4 100755
--- a/Script/DeleteThread.py
+++ b/Script/DeleteThread.py
@@ -245,7 +245,9 @@ class DeleteThread(threading.Thread):
                         if filehealth and not filehealth == 'TRUNCATED':
                             success &= (castorfilesize == dbfilesize)
                             success &= (dbchecksum.lower() == checksum.lower())
-                                   
+                        elif not filehealth:
+                            success = False
+                                                               
                 if success:
                     self.delete(deletefile)
                 else:
-- 
GitLab