diff --git a/Script/CopyThread.py b/Script/CopyThread.py index 80fac7eca552e6f6e331846cfd26903978f62d40..f0ec52d3d732845c464dd030a7eac3f703c87940 100755 --- a/Script/CopyThread.py +++ b/Script/CopyThread.py @@ -186,8 +186,7 @@ class CopyThread(threading.Thread): self.logger) success = (SFO_filesize == Castor_filesize) - - + ### If DB is available, compare also checksum and db filesize if self.db: self.dbLock.acquire() @@ -196,9 +195,9 @@ class CopyThread(threading.Thread): self.dbLock.release() if not filehealth == 'TRUNCATED': - success = success and (Castor_filesize == dbfilesize) - success = success and (dbchecksum.lower() == checksum.lower()) - + success &= (Castor_filesize == dbfilesize) + success &= (dbchecksum.lower() == checksum.lower()) + if success: self.logInfo = {'file':self.logger.findCaller()[0],'line':self.logger.findCaller()[1]}