From d3dfa83b4069507df5e8e36def33826a269cd720 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 15 Jun 2022 22:43:54 +0100 Subject: Fix clean arg handling (#17392) --- lib/python/qmk/cli/flash.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/python/qmk/cli/flash.py') diff --git a/lib/python/qmk/cli/flash.py b/lib/python/qmk/cli/flash.py index 28e48a4101..216896b974 100644 --- a/lib/python/qmk/cli/flash.py +++ b/lib/python/qmk/cli/flash.py @@ -59,8 +59,9 @@ def flash(cli): If bootloader is omitted the make system will use the configured bootloader for that keyboard. """ if cli.args.clean and not cli.args.filename and not cli.args.dry_run: - command = create_make_command(cli.config.flash.keyboard, cli.config.flash.keymap, 'clean') - cli.run(command, capture_output=False, stdin=DEVNULL) + if cli.config.flash.keyboard and cli.config.flash.keymap: + command = create_make_command(cli.config.flash.keyboard, cli.config.flash.keymap, 'clean') + cli.run(command, capture_output=False, stdin=DEVNULL) # Build the environment vars envs = {} -- cgit v1.2.3