'Execute single query
:param query: Query string
:param args: Arguments to query string
:param fetchall: Boolean to indicate all results must be fetched
:param fetchone: Boolean to indicate one result must be fetched (to walk results for instance)
:return: query results'

def action(self, query, args=None, fetchall=False, fetchone=False):

    if (query is None):
        return
    sql_results = None
    attempt = 0
    with db_locks[self.filename]:
        self._set_row_factory()
        while (attempt < 5):
            try:
                if (args is None):
                    logger.log(((self.filename + u':    ') + query), logger.DB)
                else:
                    logger.log(((((self.filename + u':    ') + query) + u'    with    args    ') + str(args)), logger.DB)
                sql_results = self._execute(query, args, fetchall=fetchall, fetchone=fetchone)
                self.connection.commit()
                break
            except sqlite3.OperationalError as e:
                if ((u'unable    to    open    database    file' in e.args[0]) or (u'database    is    locked' in e.args[0])):
                    logger.log((u'DB    error:    ' + ex(e)), logger.WARNING)
                    attempt += 1
                    time.sleep(1)
                else:
                    logger.log((u'DB    error:    ' + ex(e)), logger.ERROR)
                    raise
            except sqlite3.DatabaseError as e:
                logger.log((u'Fatal    error    executing    query:    ' + ex(e)), logger.ERROR)
                raise
        return sql_results
