Skip to content

Commit 3965185

Browse files
committed
change the ERROR to WARNING; a message saying how to resolve these warnings
1 parent 0499eb5 commit 3965185

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/test.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,18 +323,18 @@ def verifyPDFs(manifestList):
323323
if os.access(f, os.R_OK):
324324
fileMd5 = hashlib.md5(open(f, 'rb').read()).hexdigest()
325325
if 'md5' not in item:
326-
print 'ERROR: Missing md5 for file "' + f + '".',
326+
print 'WARNING: Missing md5 for file "' + f + '".',
327327
print 'Hash for current file is "' + fileMd5 + '"'
328328
error = True
329329
continue
330330
md5 = item['md5']
331331
if fileMd5 != md5:
332-
print 'ERROR: MD5 of file "' + f + '" does not match file.',
332+
print 'WARNING: MD5 of file "' + f + '" does not match file.',
333333
print 'Expected "' + md5 + '" computed "' + fileMd5 + '"'
334334
error = True
335335
continue
336336
else:
337-
print 'ERROR: Unable to open file for reading "' + f + '".'
337+
print 'WARNING: Unable to open file for reading "' + f + '".'
338338
error = True
339339
return not error
340340

@@ -363,7 +363,10 @@ def setUp(options):
363363
manifestList = json.load(mf)
364364

365365
downloadLinkedPDFs(manifestList)
366-
verifyPDFs(manifestList)
366+
367+
if not verifyPDFs(manifestList):
368+
print 'Unable to verify the checksum for the files that are used for testing.'
369+
print 'Please re-download the files, or adjust the MD5 checksum in the manifest for the files listed above.\n'
367370

368371
for b in testBrowsers:
369372
State.taskResults[b.name] = { }

0 commit comments

Comments
 (0)