Exemplo n.º 1
0
def check_and_upload(url, filename, sha1):
    if not os.path.exists(filename) or utils.sha1(filename) != sha1:
        if not utils.copy_file_from_url(url, filename, sha1):
            return False

    return True
Exemplo n.º 2
0
def check_and_upload(url, filename, sha1):
    if not os.path.exists(filename) or utils.sha1(filename) != sha1:
        if not utils.copy_file_from_url(url, filename, sha1):
            return False

    return True
Exemplo n.º 3
0
def write_sha1(out_dir, in_file):
    sha1 = utils.sha1(in_file)
    utils.write_sha1(sha1, out_dir + "sha1.sum")
Exemplo n.º 4
0
def write_sha1(out_dir, in_file):
    sha1 = utils.sha1(in_file)
    utils.write_sha1(sha1, out_dir + "sha1.sum")