It is unlawful for any person, by or for whom any excavation is made in a public street or sidewalk for any purpose, to fail to cause a barricade, rail or other sufficient fence to be placed so as to enclose such excavation, together with the dirt, gravel or other material thrown therefrom, and to maintain such barricade during the whole time for which such excavation continues; and it is unlawful for any person to fail to have lighted lanterns or some other proper and sufficient lights fixed to parts of such barricade, or in some other proper manner over or near the excavation, and over and near the dirt, gravel or other material taken therefrom, and so kept from the beginning of twilight through the whole of every night during all the time such excavation exists. It is unlawful for any person maliciously or wantonly and without legal cause, to extinguish, remove or diminish the lights or to tear down or remove any rail, fence or barricade fixed in accordance with the provisions of this section. (Prior code § 15-2-3)