1. Tomas Zulberti
  2. pet-builder


Tomas Zulberti  committed 55e6e39

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

  • Participants
  • Parent commits df061d2
  • Branches default

Comments (0)

Files changed (1)

File pet_builder/basic_structure.py

View file
  • Ignore whitespace
 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')