1
0
mirror of https://github.com/gryf/e-uae-wrapper.git synced 2026-02-07 09:35:45 +01:00

Added a fall-back to wrong/nonexistent e-uae.ini file

This commit is contained in:
2018-02-18 11:50:46 +01:00
parent 934e040aac
commit c3ec58a331

View File

@@ -106,10 +106,16 @@ def _get_common_config():
try:
parser.read(conf_path)
except configparser.ParsingError:
# Configuration syntax is wrong
logging.warning("Configuration is in wrong ini format and cannot be"
" parsed.")
return {}
try:
section = parser.sections()[0]
except IndexError:
logging.warning("Configuration lacks of required section.")
return {}
section = parser.sections()[0]
conf = collections.OrderedDict()
for option in parser.options(section):
if option in ['wrapper_rom_path']: