|
| 1 | +# SPDX-FileCopyrightText: 2018 Arduino SA |
| 2 | +# SPDX-FileCopyrightText: 2019 Brent Rubell for Adafruit Industries |
| 3 | +# |
| 4 | +# SPDX-License-Identifier: MIT |
| 5 | + |
1 | 6 | # Copyright (c) 2018 Arduino SA. All rights reserved.
|
2 | 7 | #
|
3 | 8 | # This library is free software; you can redistribute it and/or
|
|
13 | 18 | # You should have received a copy of the GNU Lesser General Public
|
14 | 19 | # License along with this library; if not, write to the Free Software
|
15 | 20 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16 |
| -# |
17 |
| -# The MIT License (MIT) |
18 |
| -# |
19 |
| -# Copyright (c) 2019 Brent Rubell for Adafruit Industries |
20 |
| -# |
21 |
| -# Permission is hereby granted, free of charge, to any person obtaining a copy |
22 |
| -# of this software and associated documentation files (the "Software"), to deal |
23 |
| -# in the Software without restriction, including without limitation the rights |
24 |
| -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
25 |
| -# copies of the Software, and to permit persons to whom the Software is |
26 |
| -# furnished to do so, subject to the following conditions: |
27 |
| -# |
28 |
| -# The above copyright notice and this permission notice shall be included in |
29 |
| -# all copies or substantial portions of the Software. |
30 |
| -# |
31 |
| -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
32 |
| -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
33 |
| -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
34 |
| -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
35 |
| -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
36 |
| -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
37 |
| -# THE SOFTWARE. |
| 21 | + |
38 | 22 | """
|
39 | 23 | `adafruit_atecc`
|
40 | 24 | ================================================================================
|
@@ -161,8 +145,8 @@ def wakeup(self):
|
161 | 145 | try:
|
162 | 146 | if data[0] != 96:
|
163 | 147 | raise TypeError("ATECCx08 not found - please check your wiring!")
|
164 |
| - except IndexError: |
165 |
| - raise IndexError("ATECCx08 not found - please check your wiring!") |
| 148 | + except IndexError as err: |
| 149 | + raise IndexError("ATECCx08 not found - please check your wiring!") from err |
166 | 150 | self._i2c_bus.unlock()
|
167 | 151 | if not self._i2c_device:
|
168 | 152 | self._i2c_device = I2CDevice(self._i2c_bus, _REG_ATECC_DEVICE_ADDR)
|
|
0 commit comments