code: def _convert_status(self, msg):
          
          code = msg.get_int()
          text = msg.get_text()
          if code == SFTP_OK:
              return
          elif code == SFTP_EOF:
              raise EOFError(text)
          elif code == SFTP_NO_SUCH_FILE:
              # clever idea from john a. meinel: map the error codes to errno
              raise IOError(errno.ENOENT, text)
          elif code == SFTP_PERMISSION_DENIED:
              raise IOError(errno.EACCES, text)
          else:
              raise IOError(text)
docs: Raises EOFError or IOError on error status; otherwise does nothing.