comparison autobot/template.py @ 69:849bbc2e5572

first use of project template -> devicemanager
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 11 Jan 2011 12:57:43 -0800
parents fbd4a34d8e42
children d033843da35a
comparison
equal deleted inserted replaced
68:fbd4a34d8e42 69:849bbc2e5572
176 else: 176 else:
177 here = os.path.dirname(os.path.abspath(__file__)) 177 here = os.path.dirname(os.path.abspath(__file__))
178 projectdir = os.path.join(here, 'projects', project) 178 projectdir = os.path.join(here, 'projects', project)
179 if os.path.exists(projectdir): 179 if os.path.exists(projectdir):
180 assert os.path.isdir(projectdir) 180 assert os.path.isdir(projectdir)
181 else:
182 os.makedirs(projectdir)
181 output = os.path.join(projectdir, '__init__.py') 183 output = os.path.join(projectdir, '__init__.py')
182 assert not os.path.exists(output), "Project '%s' already exists" % project 184 assert not os.path.exists(output), "Project '%s' already exists" % project
183 185
184 return variables, output 186 return variables, output
185 187