From 9b2d21d41ae4d0ed648df967155c48a7d12248fe Mon Sep 17 00:00:00 2001 From: bMorgan01 Date: Tue, 13 Sep 2022 23:25:07 -0600 Subject: [PATCH] fixed checksums --- main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 7524377..71361e8 100755 --- a/main.py +++ b/main.py @@ -60,8 +60,7 @@ def cmp(p1, p2): if len(l1) == len(l2): for i in range(len(l1)): if l1[i] != l2[i]: - if "" not in l1[i]: - return False + return False else: return False @@ -87,7 +86,7 @@ def main(): with open(checksums_path, 'r') as checksums_file: for line in checksums_file.readlines(): thirds = line.split() - checksums[thirds[0]] = (thirds[1:]) + checksums[thirds[0]] = thirds[1:] except FileNotFoundError: print("No checksums file found at path, new file will be created.") @@ -126,7 +125,7 @@ def main(): different_count = 0 for l in ordered: lastmod = date.strftime("%Y-%m-%dT%H:%M:%S+00:00") - if l in checksums.keys() and checksums[l[0]] == new_checksums[l[0]]: + if l[0] in checksums.keys() and checksums[l[0]][0] == new_checksums[l[0]]: lastmod = checksums[l[0]][1] different_count += 1