forked from kieranjol/IFIscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbatchvalidate.py
More file actions
executable file
·26 lines (26 loc) · 847 Bytes
/
batchvalidate.py
File metadata and controls
executable file
·26 lines (26 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python3
import validate
import sys
import os
import subprocess
source = sys.argv[1]
results = []
for root, dirname, filenames in os.walk(source):
error_counter = 0
for files in filenames:
if files.endswith('_manifest.md5'):
if os.path.basename(root) != 'logs':
manifest = os.path.join(root, files)
print(manifest)
if os.path.isfile(manifest):
error_counter = validate.main([manifest])
if error_counter == 0:
results.append([root, 'success'])
else:
results.append([root, 'failure'])
for result in results:
print(result)
else:
continue
for result in results:
print(result)