Skip to content

Commit

Permalink
Remove useless check
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-Crow committed Oct 23, 2023
1 parent 89f36e5 commit 338d1cc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions dsfr/management/commands/integrity_checksums.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ def handle(self, *args, **options):
with open("dsfr/constants.py", "w") as output_file:
output_file.write(output_text)

def calculate_checksum(self, input_content):
if isinstance(input_content, str):
input_content = input_content.encode()

def calculate_checksum(self, input_content: bytes):
hashed_content = hashlib.sha384(input_content).digest()
hash_base64 = base64.b64encode(hashed_content).decode()
return "sha384-{}".format(hash_base64)

0 comments on commit 338d1cc

Please sign in to comment.