Skip to content

Commit b22bf69

Browse files
authored
Adapting to W0707 pylint message
W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from): > 2020-08-23T08:28:02.9225541Z ************* Module adafruit_pm25.i2c > 2020-08-23T08:28:02.9226318Z adafruit_pm25/i2c.py:84:16: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
1 parent 29dad18 commit b22bf69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_pm25/i2c.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,5 @@ def _read_into_buffer(self):
8080
with self.i2c_device as i2c:
8181
try:
8282
i2c.readinto(self._buffer)
83-
except OSError:
84-
raise RuntimeError("Unable to read from PM2.5 over I2C")
83+
except OSError as err:
84+
raise RuntimeError("Unable to read from PM2.5 over I2C") from err

0 commit comments

Comments
 (0)