code: def error(self, fail=True, action=''):
          
          e = 'There was an unknown error communicating with the device.'
          if action:
              e = 'While %s: %s' % (action, e)
          log.error(e)
          if fail:
              raise IOError(e)
docs: SHOULD BE PRIVATE METHOD