mirror of
https://github.com/derrod/legendary.git
synced 2024-09-28 23:41:52 +12:00
[core] Ignore comments in configuration environment variables
Comments are treated as keys with no value by configparser, but env variables with None as the value are not valid so this would crash. Fixes #156
This commit is contained in:
parent
5e1896cf2c
commit
3e2a6011ff
1 changed files with 2 additions and 2 deletions
|
@ -375,9 +375,9 @@ class LegendaryCore:
|
||||||
# get environment overrides from config
|
# get environment overrides from config
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
if 'default.env' in self.lgd.config:
|
if 'default.env' in self.lgd.config:
|
||||||
env.update(dict(self.lgd.config['default.env']))
|
env.update({k: v for k, v in self.lgd.config[f'default.env'].items() if v and not k.startswith(';')})
|
||||||
if f'{app_name}.env' in self.lgd.config:
|
if f'{app_name}.env' in self.lgd.config:
|
||||||
env.update(dict(self.lgd.config[f'{app_name}.env']))
|
env.update({k: v for k, v in self.lgd.config[f'{app_name}.env'].items() if v and not k.startswith(';')})
|
||||||
|
|
||||||
if wine_pfx:
|
if wine_pfx:
|
||||||
env['WINEPREFIX'] = wine_pfx
|
env['WINEPREFIX'] = wine_pfx
|
||||||
|
|
Loading…
Reference in a new issue