File: //usr/lib/python3.9/site-packages/iniparse/__pycache__/utils.cpython-39.opt-1.pyc
a
�q=b� � @ s0 d dl mZ d dlmZmZ dd� Zdd� ZdS )� )�compat)�
LineContainer� EmptyLinec C s� t | tj�r| j} | jj}d}|t|�k r�t || t�rNt|| � |d7 }qt ||d t �rvt || t �rv||= q|d7 }q|r�t |d t �r�|d= |r�t |d t �s�|�
t � � dS )z�Clean up blank lines.
This functions makes the configuration look clean and
handwritten - consecutive empty lines and empty lines at
the start of the file are removed, and one is guaranteed
to be at the end of the file.
r � ���N)�
isinstancer ZRawConfigParser�data�_data�contents�lenr �tidy_sectionr �append)Zcfg�cont�i� r �2/usr/lib/python3.9/site-packages/iniparse/utils.py�tidy s"