Handle failed import with exception instead

This commit is contained in:
zvecr
2020-03-27 00:11:19 +00:00
committed by skullydazed
parent ab7d0c6e46
commit a0b692d718
+5 -2
View File
@@ -79,10 +79,13 @@ def main():
# Import the subcommand modules
import qmk_cli.subcommands
if qmk_firmware.exists() and os.listdir(qmk_firmware):
if qmk_firmware.exists():
os.chdir(str(qmk_firmware))
sys.path.append(str(qmk_firmware / 'lib' / 'python'))
import qmk.cli
try:
import qmk.cli
except ImportError:
pass # Ingore as this might folder might not be set up correctly
# Call the entrypoint
milc.cli()