Remove redundant open modes (#33652)

This commit is contained in:
Franck Nijhof authored and GitHub committed 2020-04-04 22:49:15 +02:00
1 parent fddaea797e
commit 22ae498f3a
9 files changed
+12 -12

No files matched your search

+2 -2
View File
@@ -176,7 +176,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
# We have an owfs mounted
else:
for family_file_path in glob(os.path.join(base_dir, "*", "family")):
with open(family_file_path, "r") as family_file:
with open(family_file_path) as family_file:
family = family_file.read()
if "EF" in family:
continue
@@ -218,7 +218,7 @@ class OneWire(Entity):
def _read_value_raw(self):
"""Read the value as it is returned by the sensor."""
with open(self._device_file, "r") as ds_device_file:
with open(self._device_file) as ds_device_file:
lines = ds_device_file.readlines()
return lines