1
0
Fork 0

Cleanup issues identified by lgtm (#14459)

* cleanup issues identified by lgtm

* fix the git_status check
This commit is contained in:
Zach White 2021-09-27 10:02:54 -07:00 committed by GitHub
parent 5f38a98fa0
commit fce9cb9338
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 24 additions and 42 deletions

View file

@ -118,10 +118,9 @@ def check_udev_rules():
cli.log.warning("{fg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader)
else:
# For caterina, check if ModemManager is running
if bootloader == "caterina":
if check_modem_manager():
rc = CheckStatus.WARNING
cli.log.warning("{fg_yellow}Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.")
if bootloader == "caterina" and check_modem_manager():
cli.log.warning("{fg_yellow}Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.")
rc = CheckStatus.WARNING
cli.log.warning("{fg_yellow}Missing or outdated udev rules for '%s' boards. Run 'sudo cp %s/util/udev/50-qmk.rules /etc/udev/rules.d/'.", bootloader, QMK_FIRMWARE)
@ -167,6 +166,5 @@ def os_test_linux():
return CheckStatus.OK
else:
cli.log.info("Detected {fg_cyan}Linux{fg_reset}.")
from .linux import check_udev_rules
return check_udev_rules()