diff options
| author | Ultrabug <ultrabug@gentoo.org> | 2013-07-15 19:48:53 +0200 |
|---|---|---|
| committer | Ultrabug <ultrabug@gentoo.org> | 2013-07-15 19:48:53 +0200 |
| commit | 91a056302b8b2501ad4324dc28cf53fa826590a6 (patch) | |
| tree | 6317b004cb6c2f330dc7326317236dc819953cc9 /py3status | |
| parent | bef55f2092484e8031f60f51074d40d2f51c97df (diff) | |
dont die on unquoted i3status.conf parameter value, thx to @pfsmorigo
Diffstat (limited to 'py3status')
| -rwxr-xr-x | py3status/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/py3status/__init__.py b/py3status/__init__.py index cb17651..d93cdbd 100755 --- a/py3status/__init__.py +++ b/py3status/__init__.py @@ -148,7 +148,10 @@ def i3status_config_reader(config_file): if key in config: if value in ['true', 'false']: value = 'True' if value == 'true' else 'False' - config[key] = eval(value) + try: + config[key] = eval(value) + except NameError: + config[key] = value if in_time and '=' in line: key, value = line.split('=')[0].strip(), line.split('=')[1].strip() if 'time_' + key in config: |
