mirror of
https://github.com/DarklightGames/io_scene_psk_psa.git
synced 2024-11-23 22:40:59 +01:00
Fix #101: Dashes in the names of PSA config keys results in parsing errors
The issue here was the regex pattern was too restrictive, so it did not pick up the lines as ones that needed to have the `=` appended at the end so that the ConfigParser could properly parse the file.
This commit is contained in:
parent
03c69783b3
commit
e1f0fc7e89
@ -28,7 +28,7 @@ def _load_config_file(file_path: str) -> ConfigParser:
|
||||
with open(file_path, 'r') as f:
|
||||
lines = f.read().split('\n')
|
||||
|
||||
lines = [re.sub(r'^\s*(\w+)\s*$', r'\1=', line) for line in lines]
|
||||
lines = [re.sub(r'^\s*([^=]+)\s*$', r'\1=', line) for line in lines]
|
||||
|
||||
contents = '\n'.join(lines)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user