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 sys
|
||||
import logging
|
||||
import errno
|
||||
|
||||
@ -421,10 +420,7 @@ def load_config(filename, target):
|
||||
(_, ext) = os.path.splitext(filename)
|
||||
if ext == '.py':
|
||||
cfg = ConfigPython(filename, target)
|
||||
elif ext in ['.json', '.yml']:
|
||||
cfg = ConfigStatic(filename, target)
|
||||
else:
|
||||
logging.error('Config file extenstion not recognized')
|
||||
sys.exit(1)
|
||||
cfg = ConfigStatic(filename, target)
|
||||
|
||||
return cfg
|
||||
|
Loading…
Reference in New Issue
Block a user