diff options
Diffstat (limited to 'lib/python/qmk/cli')
| -rw-r--r-- | lib/python/qmk/cli/doctor/linux.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/python/qmk/cli/doctor/linux.py b/lib/python/qmk/cli/doctor/linux.py index a803305c0d..95bafe8c64 100644 --- a/lib/python/qmk/cli/doctor/linux.py +++ b/lib/python/qmk/cli/doctor/linux.py | |||
| @@ -78,10 +78,13 @@ def check_udev_rules(): | |||
| 78 | 78 | ||
| 79 | # Collect all rules from the config files | 79 | # Collect all rules from the config files |
| 80 | for rule_file in udev_rules: | 80 | for rule_file in udev_rules: |
| 81 | for line in rule_file.read_text(encoding='utf-8').split('\n'): | 81 | try: |
| 82 | line = line.strip() | 82 | for line in rule_file.read_text(encoding='utf-8').split('\n'): |
| 83 | if not line.startswith("#") and len(line): | 83 | line = line.strip() |
| 84 | current_rules.add(line) | 84 | if not line.startswith("#") and len(line): |
| 85 | current_rules.add(line) | ||
| 86 | except PermissionError: | ||
| 87 | cli.log.debug("Failed to read: %s", rule_file) | ||
| 85 | 88 | ||
| 86 | # Check if the desired rules are among the currently present rules | 89 | # Check if the desired rules are among the currently present rules |
| 87 | for bootloader, rules in desired_rules.items(): | 90 | for bootloader, rules in desired_rules.items(): |
