Skip to content

Commit dabc9f5

Browse files
committed
Ruff fix
1 parent 9ed51ce commit dabc9f5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plugwise_usb/helpers/cache.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,8 @@ async def write_cache(self, data: dict[str, str], rewrite: bool = False) -> None
148148
finally:
149149
# Cleanup on error
150150
if temp_path and temp_path.exists():
151-
try:
151+
with contextlib.suppress(OSError):
152152
temp_path.unlink()
153-
except OSError:
154-
pass
155153

156154
async def read_cache(self) -> dict[str, str]:
157155
"""Return current data from cache file."""

0 commit comments

Comments
 (0)