0001-hobo-handle-theme-overlays-as-in-hobo-agent-20272.patch
wcs/ctl/check_hobos.py | ||
---|---|---|
185 | 185 |
atomic_symlink(target_dir, theme_dir) |
186 | 186 |
for component in ('static', 'templates'): |
187 | 187 |
component_dir = os.path.join(tenant_dir, component) |
188 |
if os.path.lexists(component_dir): |
|
189 |
os.unlink(component_dir) |
|
190 |
if theme_data.get('overlay'): |
|
188 |
if not os.path.islink(component_dir) and os.path.isdir(component_dir): |
|
189 |
try: |
|
190 |
os.rmdir(component_dir) |
|
191 |
except OSError: |
|
192 |
continue |
|
193 |
if not theme_data.get('overlay'): |
|
194 |
try: |
|
195 |
os.unlink(component_dir) |
|
196 |
except OSError: |
|
197 |
pass |
|
198 |
else: |
|
191 | 199 |
atomic_symlink( |
192 | 200 |
os.path.join(self.THEMES_DIRECTORY, theme_data['overlay'], component), |
193 | 201 |
component_dir) |
194 |
- |