1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-18 09:07:40 +00:00

move current commit hash to its own file

This commit is contained in:
Virgil Grigoras
2018-09-09 13:00:46 +02:00
parent f477d48c7c
commit 6e2dbb7cd6
3 changed files with 22 additions and 4 deletions

View File

@@ -547,3 +547,11 @@ def check_unrar(unrarLocation):
error=True
return (error, version)
def is_sha1(sha1):
if len(sha1) != 40:
return False
try:
temp = int(sha1, 16)
except ValueError:
return False
return True