From 0109e8bd9ad3b690134e910c23787d127eeebcd3 Mon Sep 17 00:00:00 2001 From: Wainer Vandelli <Wainer.Vandelli@cern.ch> Date: Wed, 28 Apr 2010 09:42:03 +0000 Subject: [PATCH] Refactoring --- Script/CopyThread.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Script/CopyThread.py b/Script/CopyThread.py index 80fac7e..f0ec52d 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]} -- GitLab