Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1867 | minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Jul 15, 2024
1 parent 65c45ac commit 7fae62c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ocldev/checksum.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,13 @@ def _locales_for_checksums(data, relation, fields, predicate_func):

def _generate(self, obj, hash_algorithm='MD5'):
# hex encoding is used to make the hash more readable
serialized_obj = self._serialize(obj).encode('utf-8')

serialized_obj = self._serialize(obj)
if self.verbosity:
print("\n")
print("After Serialization")
print(serialized_obj.decode())
print(serialized_obj)

serialized_obj = serialized_obj.encode('utf-8')

hash_func = hashlib.new(hash_algorithm)
hash_func.update(serialized_obj)
Expand Down

0 comments on commit 7fae62c

Please sign in to comment.