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:
Claudius Heine 2017-07-06 10:28:55 +02:00 committed by Daniel Wagner
parent f58d44f190
commit f10718043e

View File

@ -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