refs #1437 - Scripts corrections

pull/19/head
Gerardo GIl Elizeire 2025-02-03 16:58:03 +01:00
parent 882d5f1886
commit 0d80bcf2c2
2 changed files with 4 additions and 1 deletions

View File

@ -236,6 +236,9 @@ def main():
datafullsum = get_md5_fullsum(file_path)
file.write(datafullsum)
else:
# Si el archivo existe, almacenamos el "full.sum" en la variable "datafullsum", porque es requerido para crear el torrent:
with open(fullsum_file, 'r') as file:
datafullsum = file.read().strip('\n')
journal.send("createTorrentSum.py: '.full.sum' file exists", PRIORITY=journal.LOG_INFO, SYSLOG_IDENTIFIER="ogrepo-api_DEBUG")
print("Fullsum file exists")

View File

@ -109,7 +109,7 @@ def export_image(file_path, remote_host, remote_user):
"""
# Creamos una lista con las extensiones de los archivos asociados a la imagen
# (incluyendo ninguna extensión, que corresponde a la propia imagen):
extensions = ['', '.size', '.sum', '.full.sum', '.torrent', '.info.checked']
extensions = ['', '.size', '.sum', '.full.sum', '.info.checked']
# Iniciamos un cliente SSH:
ssh_client = paramiko.SSHClient()