Skip to content

Commit 7681a37

Browse files
authored
Merge pull request #130 from ApplauseOSS/fix/include-warn
fix: don't fail on missing site config include file
2 parents 4e7abc6 + 544c3b1 commit 7681a37

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

deploy_config_generator/site_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ def load_file(self, path):
112112
if not include_path.startswith('/'):
113113
# Normalize include path based on location of parent file
114114
include_path = os.path.join(os.path.dirname(path), include_path)
115+
if not os.path.exists(include_path):
116+
self._display.vv('Skipping non-existant included file %s' % include_path)
117+
continue
115118
self._display.v('Loading site config from included file %s' % include_path)
116119
include_data = self.load_file(include_path)
117120
data = dict_merge(data, include_data)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def run(self):
5353

5454
setup(
5555
name='deploy-config-generator',
56-
version='2.30.1',
56+
version='2.30.2',
5757
url='https://github.com/ApplauseOSS/deploy-config-generator',
5858
license='MIT',
5959
description='Utility to generate service deploy configurations',

tests/integration/site_config_includes/site_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ plugins:
1212
include:
1313
- site_config.1.yml
1414
- site_config.{{ env }}.yml
15+
# This should not cause a failure
16+
- site_config.does.not.exist.yml

0 commit comments

Comments
 (0)