0001-import_template-don-t-error-out-in-case-of-missing-t.patch
hobo/agent/common/management/commands/import_template.py | ||
---|---|---|
32 | 32 |
basepath = kwargs.get('basepath', '/var/lib/%s/skeletons') |
33 | 33 |
template = '%s/%s.json' % (basepath, kwargs.get('template_name')) |
34 | 34 | |
35 |
if 'import_site' in get_commands(): |
|
36 | ||
37 |
if not os.path.isfile(template): |
|
38 |
raise(CommandError('Template not found')) |
|
35 |
if not os.path.exists(template): |
|
36 |
self.stderr.write(self.style.WARNING('Unknown template (%r)' % template)) |
|
37 |
return |
|
39 | 38 | |
39 |
if 'import_site' in get_commands(): |
|
40 | 40 |
call_command('import_site', template) |
41 |
- |