def commitreturn(self, cursor, qstring, vals=()):
    "careful: don't pass cursor (it's from decorator)"
    cursor.execute(qstring, vals)
    return cursor.fetchall()[0]
careful: don't pass cursor (it's from decorator)