Any pupil prevented from attending school on account of the health or sanitation laws of this Commonwealth, or by the sanitary regulations of the local board of health or the board of school directors, is relieved from complying with the provisions of the act amended hereby concerning compulsory attendance during the time he is prevented from attending school.
24 P.S. § 14-1417