Skip to content

Commit 745e857

Browse files
committed
minor, simplify code
1 parent 41bf192 commit 745e857

File tree

1 file changed

+1
-4
lines changed
  • dataintegrityfingerprint

1 file changed

+1
-4
lines changed

dataintegrityfingerprint/dif.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,6 @@ def count_files(self):
125125

126126
return len(self.get_files())
127127

128-
def _sort_hash_list(self):
129-
self._hash_list = sorted(self._hash_list, key=lambda x: x[0] + x[1])
130-
131128
def generate(self, progress=None):
132129
"""Generate the Data Integrity Fingerprint.
133130
@@ -166,7 +163,7 @@ def generate(self, progress=None):
166163
fl = os.path.relpath(rtn[1], self.data).replace(os.path.sep,"/")
167164
self._hash_list.append((rtn[0], fl))
168165

169-
self._sort_hash_list()
166+
self._hash_list = sorted(self._hash_list, key=lambda x: x[0] + x[1])
170167

171168
def save_checksums(self, filename=None):
172169
"""Save the checksums to a file.

0 commit comments

Comments
 (0)