0001-hobo-give-cubes-a-slug-38596.patch
bijoe/hobo_agent/management/commands/hobo_deploy.py | ||
---|---|---|
36 | 36 |
config = ConfigParser.ConfigParser() |
37 | 37 |
config.read(ini_file) |
38 | 38 | |
39 |
new = not(os.path.exists(ini_file)) |
|
40 | ||
41 | 39 |
if not os.path.exists(schemas_path): |
42 | 40 |
os.mkdir(schemas_path) |
43 | 41 |
if not config.has_section('wcs-olap'): |
... | ... | |
84 | 82 |
config.set(base_url, 'key', key) |
85 | 83 |
config.set(base_url, 'schema', schema) |
86 | 84 |
config.set(base_url, 'cubes_label', service.get('title').encode('utf-8')) |
87 |
if new:
|
|
88 |
config.set(base_url, 'cubes_slug', service.get('slug'))
|
|
85 |
if 'slug' in service:
|
|
86 |
config.set(base_url, 'cubes_slug', service['slug'])
|
|
89 | 87 |
with open(ini_file, 'w') as f: |
90 | 88 |
config.write(f) |
91 |
- |