diff --git a/python_modules/finish_cleanup.py b/python_modules/finish_cleanup.py index ae233346..ee5ff529 100644 --- a/python_modules/finish_cleanup.py +++ b/python_modules/finish_cleanup.py @@ -33,19 +33,35 @@ string_home = str(home_folder) def make_check_sum(): - """ Generate the check sum files """ + """ Generate the checksum files """ os.chdir(HOME_FOLDER + FUSATO_ROOT) - current_working_directory = os.getcwd().replace('/', '/') - for _, _, files in os.walk(current_working_directory): - current_dir = os.getcwd().replace('/', '/') - for root, dirs, files in os.walk(current_dir): + current_working_directory = os.getcwd().replace('\\', '/') + + # Using only one os.walk loop + for root, dirs, files in os.walk(current_working_directory): for fiso in files: if fiso.endswith('.iso'): sha = "sha512sum " - ext = "-sha512.checksum" - gen_sum = sha + fiso + ' >' + fiso + ext + ext = ".sha512.checksum" + gen_sum = sha + os.path.join(root, fiso) + ' > ' + os.path.join(root, fiso) + ext os.system(gen_sum) +#def make_check_sum(): +# """ Generate the check sum files """ +# os.chdir(HOME_FOLDER + FUSATO_ROOT) +# current_working_directory = os.getcwd().replace('/', '/') +# +# for _, _, files in os.walk(current_working_directory): +# current_dir = os.getcwd().replace('/', '/') +# +# # Second os.walk() loop properly indented +# for root, dirs, files in os.walk(current_dir): +# for fiso in files: +# if fiso.endswith('.iso'): +# sha = "sha512sum " +# ext = "-sha512.checksum" +# gen_sum = sha + fiso + ' >' + fiso + ext +# os.system(gen_sum) def process_iso(base, arch, desktop): """