summaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli/doctor.py
diff options
context:
space:
mode:
authorskullydazed <skullydazed@users.noreply.github.com>2020-04-18 13:00:56 -0700
committerFlorian Didron <fdidron@users.noreply.github.com>2020-06-12 17:00:27 +0900
commit1dfe06affcb723756b038f18efee35f6e30d3802 (patch)
tree7eecd9071877417133762c1e9f873793217a23af /lib/python/qmk/cli/doctor.py
parentd424a716a061bb79335940ea9594c19b4edfa3a1 (diff)
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 3c74fae699..3c46248372 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():