diff options
author | skullydazed <skullydazed@users.noreply.github.com> | 2020-04-18 13:00:56 -0700 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2020-06-12 17:00:27 +0900 |
commit | 1dfe06affcb723756b038f18efee35f6e30d3802 (patch) | |
tree | 7eecd9071877417133762c1e9f873793217a23af /lib/python/qmk/cli/doctor.py | |
parent | d424a716a061bb79335940ea9594c19b4edfa3a1 (diff) |
Move everything to Python 3.6 (#8835)
Diffstat (limited to 'lib/python/qmk/cli/doctor.py')
-rwxr-xr-x | lib/python/qmk/cli/doctor.py | 11 |
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(): |