Commits

Tino de Bruijn committed 858d513

Fixed small bug in the Board.exit method

Comments (0)

Files changed (1)

pyfirmata/pyfirmata.py

         
     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):