From 734a66939892064fe9c663fd746cb7371c7d84e4 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Fri, 26 Jun 2015 11:19:54 -0400 Subject: [PATCH] 6377: Missing application.yml is not an error. --- sdk/python/tests/run_test_server.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py index b25bf6215a..02f65e6caf 100644 --- a/sdk/python/tests/run_test_server.py +++ b/sdk/python/tests/run_test_server.py @@ -453,10 +453,13 @@ def _getport(program): def _apiconfig(key): if _cached_config: return _cached_config[key] - def _load(f): - return yaml.load(os.path.join(SERVICES_SRC_DIR, 'api', 'config', f)) + def _load(f, required=True): + fullpath = os.path.join(SERVICES_SRC_DIR, 'api', 'config', f) + if not required and not os.path.exists(fullpath): + return {} + return yaml.load(fullpath) cdefault = _load('application.default.yml') - csite = _load('application.yml') + csite = _load('application.yml', required=False) _cached_config = {} for section in [cdefault.get('common',{}), cdefault.get('test',{}), csite.get('common',{}), csite.get('test',{})]: -- 2.30.2