From 89dfc80de696e906f055ef87614c5d8567e0431c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20Crespo?= Date: Fri, 19 Oct 2018 20:34:28 -0700 Subject: [PATCH] Verify AIP: fix checksum verification When verifying checksums, omit files listed under the file group `manualNormalization`. This is connected to #287. --- src/MCPClient/lib/clientScripts/verify_aip.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/MCPClient/lib/clientScripts/verify_aip.py b/src/MCPClient/lib/clientScripts/verify_aip.py index 7ac501061f..55693e064d 100755 --- a/src/MCPClient/lib/clientScripts/verify_aip.py +++ b/src/MCPClient/lib/clientScripts/verify_aip.py @@ -163,7 +163,12 @@ def verify_checksums(job, bag, sip_uuid): verification_count = 0 verification_skipped_because_reingest = 0 for file_ in File.objects.filter(sip_id=sip_uuid): - if (os.path.basename(file_.originallocation) in removableFiles) or (not file_.currentlocation.startswith('%SIPDirectory%objects/')): + if ( + os.path.basename(file_.originallocation) in removableFiles or + not file_.currentlocation.startswith( + '%SIPDirectory%objects/') or + file_.filegrpuse == 'manualNormalization' + ): continue file_path = file_.currentlocation.replace('%SIPDirectory%', '', 1) assert_checksum_types_match(job, file_, sip_uuid, checksum_type)