config: Removes file extension check for ConfigStatic
The `load_config` function in the includehandler already checks for the file extension, so checking it before that, is redundant. Signed-off-by: Claudius Heine <ch@denx.de>
This commit is contained in:
parent
f58d44f190
commit
f10718043e
@ -24,7 +24,6 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import logging
|
import logging
|
||||||
import errno
|
import errno
|
||||||
|
|
||||||
@ -421,10 +420,7 @@ def load_config(filename, target):
|
|||||||
(_, ext) = os.path.splitext(filename)
|
(_, ext) = os.path.splitext(filename)
|
||||||
if ext == '.py':
|
if ext == '.py':
|
||||||
cfg = ConfigPython(filename, target)
|
cfg = ConfigPython(filename, target)
|
||||||
elif ext in ['.json', '.yml']:
|
|
||||||
cfg = ConfigStatic(filename, target)
|
|
||||||
else:
|
else:
|
||||||
logging.error('Config file extenstion not recognized')
|
cfg = ConfigStatic(filename, target)
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
return cfg
|
return cfg
|
||||||
|
Loading…
Reference in New Issue
Block a user