aboutsummaryrefslogtreecommitdiff
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
committerGitHub <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
qmk_firmware-66d94dc22af4fccae2af073c512662ce7eba7d98.zip
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():
135 } 135 }
136 136
137 if udev_dir.exists(): 137 if udev_dir.exists():
138 udev_rules = [str(rule_file) for rule_file in udev_dir.glob('*.rules')] 138 udev_rules = [rule_file for rule_file in udev_dir.glob('*.rules')]
139 current_rules = set() 139 current_rules = set()
140 140
141 # Collect all rules from the config files 141 # Collect all rules from the config files
142 for rule_file in udev_rules: 142 for rule_file in udev_rules:
143 with open(rule_file, "r") as fd: 143 for line in rule_file.read_text().split('\n'):
144 for line in fd.readlines(): 144 line = line.strip()
145 line = line.strip() 145 if not line.startswith("#") and len(line):
146 if not line.startswith("#") and len(line): 146 current_rules.add(line)
147 current_rules.add(line)
148 147
149 # Check if the desired rules are among the currently present rules 148 # Check if the desired rules are among the currently present rules
150 for bootloader, rules in desired_rules.items(): 149 for bootloader, rules in desired_rules.items():