EVOLUTION-MANAGER
Edit File: CommandLock.cpython-36.pyc
3 x?agL � @ sh d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZmZ G dd� de �Z G d 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�FileLockc s( e Zd ZdZ� fdd�Zdd� Z� ZS )�CommandLockErrorz>Exception raised to indicate an error acquiring a CommandLock.c s t t| �j� |j|� | _d S )N)�superr �__init__�format�_message)�self�message�args)� __class__� �!/usr/lib/python3.6/CommandLock.pyr % s zCommandLockError.__init__c C s | j S )N)r )r r r r �__str__* s zCommandLockError.__str__)�__name__� __module__�__qualname__�__doc__r r � __classcell__r r )r r r s r c sJ e Zd ZdZ� fdd�Zd � fdd� Zdd� Zd d � Z� fdd�Z� Z S )�CommandLockzSimple process locking. c s0 yt t| �j� W n td| j��Y nX | S )NzCould not lock file {0})r r � __enter__r �path)r )r r r r 5 s zCommandLock.__enter__Tc s"