~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to documentation/management/commands/create_docs.py

  • Committer: franku
  • Date: 2018-05-09 06:02:44 UTC
  • mto: This revision was merged to the branch mainline in revision 496.
  • Revision ID: somal@arcor.de-20180509060244-8r2c7h1a81b4plod
added __init__.py's

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
    def __init__(self, *args, **kwargs):
28
28
        super(Command, self).__init__(*args, **kwargs)
 
29
 
29
30
        # Define the main directories used in this class
30
31
        self.sphinx_dir = os.path.join(
31
32
            settings.WIDELANDS_SVN_DIR, 'doc/sphinx')
80
81
            except:
81
82
                raise
82
83
 
83
 
        # The newly build directory is no longer needed
84
 
        shutil.rmtree(self.build_dir)
 
84
        try:
 
85
            # The new build directory is no longer needed
 
86
            shutil.rmtree(self.build_dir)
 
87
        except:
 
88
            raise
85
89
 
86
90
    def handle(self, *args, **options):
87
91
        """Create the widelands source code documentation.