Traceback (most recent call last):
File "/home/mono/.local/bin/alacritty-colorscheme", line 8, in <module>
sys.exit(main())
File "/home/mono/.local/lib/python3.8/site-packages/alacritty_colorscheme/cli.py", line 235, in main
replace_colorscheme(colors_path, args.config_file,
File "/home/mono/.local/lib/python3.8/site-packages/alacritty_colorscheme/cli.py", line 155, in replace_colorscheme
if config_yaml['colors']:
File "/usr/lib/python3.8/site-packages/ruamel/yaml/comments.py", line 753, in __getitem__
return ordereddict.__getitem__(self, key)
KeyError: 'colors'
Config file contains following information (dict):
Executing:
Results in:
Issue here: https://github.com/toggle-corp/alacritty-colorscheme/blob/ac4a0d3432adfd81a1bc1ece2e20f4bb8815b44c/alacritty_colorscheme/cli.py#L155
It should be catched via try / except KeyError instead of "if" (this would be the pythonic way)