def insert_entry(self, table, update_dict):
        """ A wrapper for the SQL INSERT operation
        @param table: The table to search to
        @param updateDict: A dictionary with the values to set
        """
        self._connect_to_db()
        with self.con:
            cur = self.con.cursor()
            first = True
            for key, value in update_dict.iteritems():
                if first: 
                    updatefield_part = "%s" % (key)
                    setfield_part = "'%s'" % (value)
                    first = False
                else:
                    updatefield_part = updatefield_part + ", %s" % (key)
                    setfield_part = setfield_part + (value) % ", '%s'"
            query = "INSERT INTO %s(%s) VALUES(%s)"  \
                    % (table, updatefield_part, setfield_part)
            cur.execute(query)
            #self._log.info("query: %s "% query)
        self._disconnect_from_db()
dataset/ETHPy150Open sophron/BAR/bar/common/db.py/Bardb.insert_entry/swapped operands of `%`