Any ordinance amending or repealing any section of the code shall not be deemed or construed to abate any pending action based upon such amended or repealed section, nor shall the passage of such ordinance prevent the arrest, prosecution and punishment of any violation of such section committed prior to the effective date of such ordinance.