aboutsummaryrefslogtreecommitdiffstats
path: root/lib/python/qmk/cli/doctor.py
diff options
context:
space:
mode:
authorGravatar skullydazed <skullydazed@users.noreply.github.com>2020-04-18 13:00:56 -0700
committerGravatar GitHub <noreply@github.com>2020-04-18 22:00:56 +0200
commit66d94dc22af4fccae2af073c512662ce7eba7d98 (patch)
treea720968b0f1951cc2ec920da373701d308f04d88 /lib/python/qmk/cli/doctor.py
parent5a8f59503e41923030249561e9ef56be62de3efa (diff)
downloadqmk_firmware-66d94dc22af4fccae2af073c512662ce7eba7d98.tar.gz
Move everything to Python 3.6 (#8835)
Diffstat (limited to 'lib/python/qmk/cli/doctor.py')
-rwxr-xr-xlib/python/qmk/cli/doctor.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py
index 3c74fae69..3c4624837 100755
--- a/lib/python/qmk/cli/doctor.py
+++ b/lib/python/qmk/cli/doctor.py
@@ -135,16 +135,15 @@ def check_udev_rules():
}
if udev_dir.exists():
- udev_rules = [str(rule_file) for rule_file in udev_dir.glob('*.rules')]
+ udev_rules = [rule_file for rule_file in udev_dir.glob('*.rules')]
current_rules = set()
# Collect all rules from the config files
for rule_file in udev_rules:
- with open(rule_file, "r") as fd:
- for line in fd.readlines():
- line = line.strip()
- if not line.startswith("#") and len(line):
- current_rules.add(line)
+ for line in rule_file.read_text().split('\n'):
+ line = line.strip()
+ if not line.startswith("#") and len(line):
+ current_rules.add(line)
# Check if the desired rules are among the currently present rules
for bootloader, rules in desired_rules.items():