size change warn only if not LFS
@@ -214,15 +214,17 @@ def copy_currents_from_html_pages(prefix, filelist, datetag, prompt, test_type):
urllib.urlretrieve("%s/%s/pascal_trunk_%s/c_%s"%(prefix,datetag,mode,f),
filename=target_file)
# Do some simple sanity checks on the resulting file
+ isLFS = False
if test_type == 'png' and imghdr.what(target_file) != 'png':
with open(target_file) as f:
if 'https://git-lfs.' in f.readline():
f.readline()
cursize = f.readline().strip().split(' ')[1]
+ isLFS = True
else:
print("Warning: file \"%s\" is not PNG (nor LFS) format!"%target_file)
newsize = os.stat(target_file).st_size
- if newsize < (1-0.25)*cursize or newsize > (1+0.25)*cursize:
+ if not isLFS and (newsize < (1-0.25)*cursize or newsize > (1+0.25)*cursize):
print("Warning: dramatic change in size of file (old=%d/new=%d)\"%s\"!"%(cursize,newsize,target_file))
#
