hamishcunningham / pi-tronics

Source code for Raspberry Pi GATE projects.
http://pi.gate.ac.uk/
42 stars 15 forks source link

Use correct variable for scope in i2c i/o errors #118

Open adamharley opened 4 years ago

adamharley commented 4 years ago

The i2c i/o error code currently tried to use e which only exists in the scope of the earlier except block. The correct scope variable is error which e is assigned out to.

The existing code will yield UnboundLocalError "local variable 'e' referenced before assignment" instead of passing the original error.