Force triangles only (or warn user) before exporting with built in blender functions
this script triangulates a model.  If you are in Edit mode it will switch to Object mode before triangulation takes place.  If you add bpy.ops.object.mode_set(mode='EDIT') at the end of the script then it will return to Edit mode when completed. 

import bpy
import bmesh


if bpy.context.selected_objects:
    for obj in bpy.context.selected_objects:
        bpy.context.scene.objects.active = obj
        bpy.ops.object.mode_set(mode='OBJECT')

        obj = bpy.context.object
        me = obj.data

        bm = bmesh.new()
        bm.from_mesh(me)
        bmesh.ops.triangulate(bm, faces=bm.faces)

        bm.to_mesh(me)
        bm.free()
        del bm