mirror of
https://github.com/gryf/e-uae-wrapper.git
synced 2026-02-13 14:25:44 +01:00
Added a fall-back to wrong/nonexistent e-uae.ini file
This commit is contained in:
@@ -106,10 +106,16 @@ def _get_common_config():
|
|||||||
try:
|
try:
|
||||||
parser.read(conf_path)
|
parser.read(conf_path)
|
||||||
except configparser.ParsingError:
|
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 {}
|
return {}
|
||||||
|
|
||||||
section = parser.sections()[0]
|
|
||||||
conf = collections.OrderedDict()
|
conf = collections.OrderedDict()
|
||||||
for option in parser.options(section):
|
for option in parser.options(section):
|
||||||
if option in ['wrapper_rom_path']:
|
if option in ['wrapper_rom_path']:
|
||||||
|
|||||||
Reference in New Issue
Block a user