| Server IP : 186.64.123.29 / Your IP : 216.73.217.94 Web Server : LiteSpeed System : Linux house.hostinglat.cl 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64 User : tuemp9827 ( 1016) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/jeepney/__pycache__/ |
Upload File : |
o
���`� � @ sR d dl Z d dlZd dlZd dlmZ G dd� de�ZG dd� d�Zdadd� Z dS ) � N)�warnc @ s e Zd ZdZdS )� NoFDErrorzQRaised by :class:`FileDescriptor` methods if it was already closed/converted
N)�__name__�
__module__�__qualname__�__doc__� r r �-/usr/lib/python3/dist-packages/jeepney/fds.pyr s r c @ s� e Zd ZdZdZdZdZdd� Zdd� Zd d
� Z dd� Z
d
d� Zdd� Zdd� Z
dd� Zdd� Zddd�Zdd� Zedd gfdd��ZdS ) �FileDescriptora+ A file descriptor received in a D-Bus message
This wrapper helps ensure that the file descriptor is closed exactly once.
If you don't explicitly convert or close the FileDescriptor object, it will
close its file descriptor when it goes out of scope, and emit a
ResourceWarning.
��_fd������c C s
|| _ d S �Nr ��self�fdr r r �__init__ s
zFileDescriptor.__init__c C s4 | j }| j | jkrd}n| j | jkrd}d|� d�S )N�closed� convertedz<FileDescriptor (z)>)r �_CLOSED�
_CONVERTED�r Zdetailr r r �__repr__ s zFileDescriptor.__repr__c C sB | j | jkrdS | j | jkrtd��| j| j | _ }t�|� dS )a Close the file descriptor
This can safely be called multiple times, but will raise RuntimeError
if called after converting it with one of the ``to_*`` methods.
This object can also be used in a ``with`` block, to close it on
leaving the block.
z.Can't close FileDescriptor after converting itN)r r r r �os�closer r r r r $ s zFileDescriptor.closec C s | S r r �r r r r � __enter__5 s zFileDescriptor.__enter__c C s | � � d S r )r )r �exc_typeZexc_val�exc_tbr r r �__exit__8 s zFileDescriptor.__exit__c C s4 | j dkrtd| j � d�td| d� | �� d S d S )Nr zFileDescriptor (z") was neither closed nor converted� )�
stacklevel�source)r r �ResourceWarningr r r r r �__del__; s
��zFileDescriptor.__del__c C s0 | j dk r| j | jkr
dnd}td|� ���d S )Nr r r z"FileDescriptor object was already )r r r r r r r �_checkC s
�zFileDescriptor._checkc C s | � � | jS )z�Get the integer file descriptor
This does not change the state of the :class:`FileDescriptor` object,
unlike the ``to_*`` methods.
)r&