Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/openstack/__pycache__/utils.cpython-39.pyc
Ðазад
a t�h)% � @ s� d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZ d dlmZ dd� Z ddd �Z ddd�Zd d� Zdd� Z dd� ZG dd� d�ZdS )� N)�discover)�_log)� exceptionsc G s d� dd� | D ��S )a A custom version of urljoin that simply joins strings into a path. The real urljoin takes into account web semantics like when joining a url like /path this should be joined to http://host/path as it is an anchored link. We generally won't care about that in client. �/c s s | ]}t |pd ��d�V qdS )� r N)�str�strip)�.0�a� r �/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/openstack/utils.py� <genexpr> � zurljoin.<locals>.<genexpr>)�join)�argsr r r �urljoin s r � c c s� t �d�}z8|du rd}n|dkr8| du r.dntd| �}t|�}W n$ tyf t�dj|d���Y n0 t�� }d}| du s�t�� || k r�|d7 }|V |� d |� t� |� qtt�|��dS ) z�Iterate and raise an exception on timeout. This is a generator that will continually yield and sleep for wait seconds, and if the timeout is reached, will raise an exception with <message>. zopenstack.iterate_timeoutNr r g�������?z>Wait value must be an int or float value. {wait} given instead)�wait� zWaiting %s seconds)r � setup_logging�min�float� ValueErrorr �SDKException�format�time�debug�sleepZResourceTimeout)�timeout�messager �log�start�countr r r �iterate_timeout# s* �� r# Tc C s` |r&G dd� d�}|� }| | |j S g }t�� �| �D ]}|d dur8|�|d � q8|S dS )z�Gets a list of required keys from a format string Required mostly for parsing base_path urls for required keys, which use the old style string formatting. c @ s e Zd Zdd� Zdd� ZdS )z+get_string_format_keys.<locals>.AccessSaverc S s g | _ d S �N)�keys��selfr r r �__init__O s z4get_string_format_keys.<locals>.AccessSaver.__init__c S s | j �|� d S r$ )r% �append)r'