We study the discharge of a two-dimensional silo through small openings via discrete element simulations. We consider the effect of the shape of the grains on the clogging of the flow, focusing on regular polygons and disks. We show that the clogging probability presents a non-linear response as a function of the number of vertexes of the polygons. Also, the clogging probability is strongly dependent on the protocol used to trigger the flow after each clog. We found that the size and shape of the blocking arches display a much larger variability for some polygons, particularly for squares, than for disks.