Where any jail, in any county in this state, shall not have a cell or dungeon therein, then, and in that case, when the court shall sentence any person or persons to imprisonment in the cell of any jail, under the provisions of this code, the person or persons so sentenced shall be confined in that part of the jail usually allotted to the confinement of criminals, or such convict may be imprisoned as provided in section 29-1001, when there is the necessity thereof mentioned in said section.