def update_entries(self, table, where_dict, set_dict, operator="AND"):
        """ A wrapper for the SQL UPDATE operation
        @param table: The table to search to
        @param whereDict: A dictionary with the WHERE clauses
        @param setDict: A dictionary with the SET clauses
        """

        self._connect_to_db()
        with self.con:
            cur = self.con.cursor()
            first = True
            for key, value in set_dict.iteritems():
                if first:
                    set_part = "%s = '%s'" % (key, value)
                    first = False
                else:
                    set_part = set_part + (key, value) % ", %s = '%s'"
            first = True
            for key, value in where_dict.iteritems():
                if first: 
                    where_part = "%s = '%s'" % (key, value)
                    first = False
                else:
                    where_part = where_part + "%s %s = '%s'" % (operator, key, value)
            query = "UPDATE %s SET %s WHERE %s" \
                    % (table, set_part, where_part)
            #self._log.info('query: %s' % query)
            cur.execute(query)
        self._disconnect_from_db()
dataset/ETHPy150Open sophron/BAR/bar/common/db.py/Bardb.update_entries/swapped operands of `%`