1. Tino de Bruijn
  2. pyFirmata

Commits

Tino de Bruijn  committed 858d513

Fixed small bug in the Board.exit method

  • Participants
  • Parent commits dfcaa00
  • Branches default

Comments (0)

Files changed (1)

File pyfirmata/pyfirmata.py

View file
  • Ignore whitespace
         
     def exit(self):
         """ Call this to exit cleanly. """
-        self.sp.close()
+        if hasattr(self, 'sp'):
+            self.sp.close()
         
     # Command handlers
     def _handle_analog_message(self, pin_nr, lsb, msb):