File: //proc/thread-self/root/usr/libexec/kcare/python/kcarectl/__pycache__/update_utils.cpython-38.pyc
U
n�h� � @ s@ d dl Z d dlZddlmZmZmZ dZd
dd�Zddd �ZdS )� N� )�config� constants�utilsi, �.kcarestatusc C s$ t j�tj| �}t�|t�� � d S )N)�os�path�joinr �PATCH_CACHEr �atomic_write�
timestamp_str)�filename�status_filepath� r �2/usr/libexec/kcare/python/kcarectl/update_utils.py�touch_status_gap_file
s r c C s� t j�tj| �}t j�|�r�t|d��V}z:t|�� �}t|�t j
t t�� kr`W W 5 Q R � dS W n t
k
rv Y nX W 5 Q R X dS )N�rFT)r r r r r
�isfile�open�int�readr �STATUS_CHANGE_GAP�STATUS_CHANGE_GAP_DELAY�time� Exception)r
r �sfile� timestampr r r �status_gap_passed s r )r )r ) r r � r r r r r r r r r r �<module> s