(a) The repeal of a Code section or ordinance, or its expiration by virtue of any provision contained therein, shall not affect any right accrued or any offense committed, any penalty or punishment incurred, or any proceeding commenced before the repeal took effect or the ordinance expired, unless otherwise provided herein. (b) When any ordinance repealing a former Code section, ordinance, clause or provision shall be itselfrepealed, such repeal shall not be construed to revive such former Code section, ordinance, clause or provision.