def is_sha1(maybe_sha):
    if (len(maybe_sha) != 40):
        return False
    try:
        sha_int = int(maybe_sha, 16)
    except ValueError:
        return False
    return True
def is_sha1(maybe_sha):
    if (len(maybe_sha) != 40):
        return False
    try:
        sha_int = int(maybe_sha, 16)
    except ValueError:
        return False
    return True