We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b43d2a commit e2f1b67Copy full SHA for e2f1b67
adafruit_platformdetect/__init__.py
@@ -62,8 +62,9 @@ def check_dt_compatible_value(self, value):
62
"""
63
# Match a value like 'qcom,apq8016-sbc':
64
try:
65
- if value in open("/proc/device-tree/compatible").read():
66
- return True
+ with open("/proc/device-tree/compatible") as compatible:
+ if value in compatible.read():
67
+ return True
68
except FileNotFoundError:
69
pass
70
0 commit comments