def fetchone(self):
        # PEP 249
        self._wait_to_finish()
        if not self.has_result_set:
            raise ProgrammingError("Tried to fetch but no results.")
        log.debug('Fetching a single row')
        try:
            return next(self)
        except __HOLE__:
            return None
dataset/ETHPy150Open cloudera/impyla/impala/hiveserver2.py/HiveServer2Cursor.fetchone