Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit f9c1524

Browse files
author
Olivier Gambier
committed
Better config exception handling
Docker-DCO-1.1-Signed-off-by: Olivier Gambier <[email protected]> (github: dmp42)
1 parent 3753407 commit f9c1524

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docker_registry/lib/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ def _init():
9494

9595
conf = Config(f.read())
9696
if flavor:
97+
if not flavor in conf:
98+
raise exceptions.ConfigError(
99+
'The specified flavor (%s) is missing in your config file (%s)'
100+
% (flavor, config_path))
97101
conf = conf[flavor]
98102
conf.flavor = flavor
99103

0 commit comments

Comments
 (0)