RegTest: Check size before hash
This commit is contained in:
@@ -260,6 +260,9 @@ def write(line):
|
|||||||
|
|
||||||
def compare_frames(path1, path2):
|
def compare_frames(path1, path2):
|
||||||
try:
|
try:
|
||||||
|
if os.stat(path1).st_size != os.stat(path2).st_size:
|
||||||
|
return False
|
||||||
|
|
||||||
with open(path1, "rb") as f:
|
with open(path1, "rb") as f:
|
||||||
hash1 = hashlib.md5(f.read()).digest()
|
hash1 = hashlib.md5(f.read()).digest()
|
||||||
with open(path2, "rb") as f:
|
with open(path2, "rb") as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user