~jvloothuis/wheeljack/trunk

« back to all changes in this revision

Viewing changes to src/wheeljack/models.py

  • Committer: Jeroen Vloothuis
  • Date: 2009-05-03 12:52:07 UTC
  • Revision ID: jvloothuis@jvloothuis-laptop-20090503125207-3oym40g8wsct7jxs
The project dir is now created when a project is saved (at it does not already exist)

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
 
147
147
    def save(self):
148
148
        """Save this project to disk."""
 
149
        if not os.path.exists(self.configroot()):
 
150
            os.mkdir(self.configroot())
149
151
        f = open(self.path, 'w')
 
152
 
150
153
        for attr in ('name', 'build_cmd', 'repository', 'vcs', 'watch_list'):
151
154
            value = getattr(self, attr)
152
155
            if attr == 'watch_list':