(self, args)
| 380 | return self._build_target(path, args, debug=debug) |
| 381 | |
| 382 | def do_new(self, args): |
| 383 | c = self._get_config() |
| 384 | n = c['counter'] + 1 |
| 385 | |
| 386 | while True: |
| 387 | name = 'project-%d' % n |
| 388 | path = os.path.join(self._get_path(), name) |
| 389 | if not os.path.exists(path): |
| 390 | logging.info('Make project path %s', path) |
| 391 | os.mkdir(path) |
| 392 | break |
| 393 | n += 1 |
| 394 | |
| 395 | args['id'] = n |
| 396 | args['name'] = name |
| 397 | args['path'] = path |
| 398 | if not args.get('title', ''): |
| 399 | args['title'] = os.path.basename(args.get('src')) |
| 400 | self._build_data(args) |
| 401 | |
| 402 | c['projects'].append(args) |
| 403 | c['counter'] = n |
| 404 | self._set_config(c) |
| 405 | |
| 406 | logging.info('Create project: %s', args) |
| 407 | return args |
| 408 | |
| 409 | def do_update(self, args): |
| 410 | self._build_data(args) |
nothing calls this directly
no test coverage detected