Skip to content

Crash on open if oblivion.ini exists in install directory #447

@alphaniner

Description

@alphaniner

If oblivion.ini exists in the install directory, it's read into a ConfigParser.ConfigParser object (Mopy/initialization.py 157-158). By default the read() method raises ParsingError if the file contains "options without values". To prevent this the ConfigParser object has to be created with allow_no_value=True.

PS. I'm not actually trying to use a local oblivion.ini; I'm working on a wizard function for proposal (to get the value of an ini setting) and created the local ini to verify that my function followed the rule indicated on uesp:

Oblivion reads the Oblivion.ini in the directory where it exists first, and only if bUseMyGames is non-existent or set to 1 does it then look for My Documents\My Games\Oblivion.ini. In other words, both can exist simultaneously, and only the value of bUseMyGames in the Oblivion.ini directory where Oblivion.exe is run from will actually matter.


Edit: initialization.py looks for the wrong setting too:

        if get_ini_option(oblivionIni, u'bUseMyGamesDirectory') == u'0':

Should be

        if get_ini_option(oblivionIni, u'bUseMyGames') == u'0':

Metadata

Metadata

Assignees

Labels

A-bootArea: Early Boot (bash.py, bush.py and initialization.py)C-bugCategory: Bug, an acknowledged defect in the programM-relnotesMisc: Issue should be listed in the version history for its milestone

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions