From bd0b390f5cebce9fa0fe28a56e2de3a04e5b4558 Mon Sep 17 00:00:00 2001 From: Saria Hajjar Date: Sat, 5 Jun 2021 10:23:26 +0100 Subject: [PATCH] Minor cleanup --- chromaterm/__main__.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/chromaterm/__main__.py b/chromaterm/__main__.py index f5e59280..0ea1a34c 100644 --- a/chromaterm/__main__.py +++ b/chromaterm/__main__.py @@ -65,8 +65,7 @@ def args_init(args=None): parser.add_argument('--config', metavar='FILE', type=str, - help='override location of config file', - default=None) + help='override config file location') parser.add_argument('--reload', action='store_true', @@ -75,8 +74,7 @@ def args_init(args=None): parser.add_argument('--rgb', action='store_true', help='Use RGB colors (default: detect support, ' - 'fallback to xterm-256)', - default=None) + 'fallback to xterm-256)') return parser.parse_args(args=args) @@ -424,8 +422,9 @@ def main(args=None, max_wait=None, write_default=True): # Create the signal handler to trigger reloading the config def reload_config_handler(*_): config_data = read_file(args.config) + if config_data is not None: - load_rules(config, config_data, rgb=args.rgb) + load_rules(config, config_data, rgb=args.rgb or None) # Trigger the initial loading reload_config_handler()