| Server IP : 74.91.139.10 / Your IP : 10.45.147.122 Web Server : Apache/2.4.67 (Unix) System : Linux prod-iad-shwpweb1001f 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64 User : FAsyXTyKGY ( 3004) PHP Version : 8.2.30 Disable Function : passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/libexec/oracle-cloud-agent/plugins/osms/ |
Upload File : |
a
ٓ�f�( � @ s8 d dl mZ d dl mZ d dl mZ d dl mZ d dlmZ d dlmZmZ d dl m
Z
mZ d dlm
Z
mZ d d lmZmZ zd d
lmZ W n ey� d d
lmZ Y n0 z
efZW n ey� eefZY n0 dZdZd
Zdd� Zdd� ZG dd� de�Z G dd� de!�Z"G dd� de�Z#ddddde fdd�Z$dS )� )�unicode_literals)�division)�print_function)�absolute_import)�wraps)�datetime� timedelta)�isgeneratorfunction�isclass)�AnyStr�Iterable)�ceil�floor)� monotonic�closed�open� half_openc s � fdd�}|S )zOBuild a predicate function that checks if an exception is a subtype from a listc s
t | � �S �N)�
issubclass)�thrown_type�_�� exc_types� �r/sparta/input/_build_configuration/image_build+validate/lib/bmcenv/lib64/python3.9/site-packages/circuitbreaker.py�
matches_types s z(in_exception_list.<locals>.matches_typesr )r r r r r �in_exception_list s r c C sv t | �rt| t�rt| �}nVz&t| � t| t�r8td��t| � }W n. typ t | �r`t | �rhtd��| }Y n0 |S )az Build a failure predicate_function.
The returned function has the signature (Type[Exception], Exception) -> bool.
Return value True indicates a failure in the underlying function.
:param expected_exception: either an type of Exception, iterable of Exception types, or a predicate function.
If an Exception type or iterable of Exception types, the failure predicate will return True when a thrown
exception type matches one of the provided types.
If a predicate function, it will just be returned as is.
:return: callable (Type[Exception], Exception) -> bool
z9expected_exception cannot be a string. Did you mean name?z1expected_exception does not look like a predicate)
r
r � Exceptionr �iter�
isinstance�STRING_TYPES�
ValueError� TypeError�callable)�expected_exception�failure_predicater r r �build_failure_predicate&