HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/lib/python3.6/site-packages/vdo/vdomgmnt/__pycache__/CommandLock.cpython-36.pyc
3

�ndL
�@shdZddlmZddlmZddlmZddlmZddlmZmZGdd�de	�Z
Gd	d
�d
e�ZdS)zx
  CommandLock - simple process locking

  $Id: //eng/vdo-releases/aluminum/src/python/vdo/vdomgmnt/CommandLock.py#2 $

�)�absolute_import)�division)�print_function)�unicode_literals)�Command�FileLockcs(eZdZdZ�fdd�Zdd�Z�ZS)�CommandLockErrorz>Exception raised to indicate an error acquiring a CommandLock.cstt|�j�|j|�|_dS)N)�superr�__init__�format�_message)�self�message�args)�	__class__��!/usr/lib/python3.6/CommandLock.pyr
%szCommandLockError.__init__cCs|jS)N)r)r
rrr�__str__*szCommandLockError.__str__)�__name__�
__module__�__qualname__�__doc__r
r�
__classcell__rr)rrr srcsJeZdZdZ�fdd�Zd
�fdd�	Zdd�Zd	d
�Z�fdd�Z�Z	S)�CommandLockzSimple process locking.
  c	s0ytt|�j�Wntd|j��YnX|S)NzCould not lock file {0})r	r�	__enter__r�path)r
)rrrr5s
zCommandLock.__enter__Tcs"tt|�j||rdnddd�dS)N�rzr+�)Ztimeout)r	rr
)r
ZfilePath�readonly)rrrr
=s
zCommandLock.__init__cs@t��dg}|jdj�fdd��jD���|jd�dj|�S)N�[�,c3s&|]}dj|tt�|��g�VqdS)�=N)�join�str�getattr)�.0�key)r
rr�	<genexpr>Esz'CommandLock.__repr__.<locals>.<genexpr>�]�)r#�appendr"�__dict__)r
Zlstr)r
r�__repr__Cs

zCommandLock.__repr__cCsdjt|�j|j�S)Nz{0}({1}))r�typerr)r
rrrrKszCommandLock.__str__cs*tt|�j�tdd|jg�}|j�dS)N�chmodZ644)r	r�_createFilerrZrun)r
�cmd)rrrr/OszCommandLock._createFile)T)
rrrrrr
r,rr/rrr)rrr.srN)rZ
__future__rrrrZ	vdo.utilsrr�	Exceptionrrrrrr�<module>s