Tomas Zulberti committed 55e6e39

Solved two bugs:
1) Deleted the folder when forced
2) Copy the tapa_revista.rst template

Comments (0)

Files changed (1)


 import os
-from shutil import copy, copytree
+from shutil import copy, copytree, rmtree
 from pet_builder import settings
 from pet_builder.utils import copy_render_template, create_folders
                   folders and templates will be replaced.
     if force and os.path.exists(settings.pet_folder):
-        os.rmdir(settings.pet_folder)
+        rmtree(settings.pet_folder)
     elif os.path.exists(settings.pet_folder):
         # if the path, already exists, then it isn't require to
             final_makefile_path = os.path.join(current_pdf_folder, 'Makefile')
             additional_values = dict(rst2pdf_params = rst2pdf_params, pdf_format = folder_name)
             copy_render_template('makefiles/pdf.makefile', final_makefile_path, additional_values)
+            copy_render_template('pdf/tapa_revista.rst', current_pdf_folder)
             # create the style
             styles_folder = os.path.join(current_pdf_folder, 'styles')