⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.144
Server IP:
157.245.143.252
Server:
Linux www 6.11.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 14 13:19:59 UTC 2024 x86_64
Server Software:
nginx/1.26.0
PHP Version:
8.3.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
uaclient
/
__pycache__
/
View File Name :
lock.cpython-312.pyc
Kf F d dl Z d dlZd dlZd dlmZ d dlmZmZmZ d dl m Z mZmZ d dl mZ d dlmZmZ d dlmZ d dlmZ e j, ej. e Z G d d e Z ee edd ej6 Zdeeef fdZd Z G d d Z!y) N)Tuple) exceptionssystemutil) DataObjectFieldStringDataValue)notices)DataObjectFileDataObjectFileFormat)UAFile)Noticec @ e Zd Z ede ede gZdedefdZy)LockDatalock_pidlock_holderc || _ || _ y Nr r )selfr r s //usr/lib/python3/dist-packages/uaclient/lock.py__init__zLockData.__init__ s & N)__name__ __module____qualname__r r fieldsstrr r r r r s0 j/* m_-F ' '3 'r r lockF)privatereturnc F t j } d}| s|S | j }| j } t j d|g t | |fS # t j $ r% t j t j w xY w# t j $ ry t j s&t j d|| t | |fcY S t j! d|| t j" t j |cY S w xY w)a Return lock info if lock file is present the lock is active. If process claiming the lock is no longer present, remove the lock file and log a warning. :return: A tuple (pid, string describing lock holder) If no active lock, pid will be -1. )lock_file_path) psz.Found stale lock file previously held by %s:%sz1Removing stale lock file previously held by %s:%s)lock_data_filereadr InvalidFileFormatErrorInvalidLockFilepathr r r subpintProcessExecutionErrorr we_are_currently_rootLOGdebugwarningensure_file_absent) lock_data_objno_lockr r s r check_lock_infor7 " s M&++- G%%H++KT8$%H {++ ,, M((8K8KLLM ++ ))+II@ M;//? !!."5"56s# A #B 8BAD !