HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/libcloud/__pycache__/__init__.cpython-310.pyc
o

;j��@s�dZddlZddlZddlZddlmZddlmZddlmZzddlZdZ	Wne
y3dZ	Ynwdd	gZd
Zdd	�Z
dd
�Zdd�Ze�dS)zx
libcloud provides a unified interface to the cloud computing resources.

:var __version__: Current version of libcloud
�N)�
DriverType)�DriverTypeFactoryMap)�
get_driverTF�__version__�enable_debugz3.9.1cCs<ddlm}ddlm}||_||_dd�}t�||�dS)z�
    Enable library wide debugging to a file-like object.

    :param fo: Where to append debugging information
    :type fo: File like object, only write operations are used.
    r)�
Connection��LoggingConnectioncSs$z|��WdStyYdSw)N)�close�	Exception)�fd�r
�E/opt/saltstack/salt/lib/python3.10/site-packages/libcloud/__init__.py�
close_file;s
�z enable_debug.<locals>.close_fileN)�libcloud.common.baser� libcloud.utils.loggingconnectionr	�log�
conn_class�atexit�register)�forr	rr
r
rr-scCs,ddlm}m}ddlm}d|_||_dS)zq
    Reset debugging functionality (if set).

    NOTE: This function is only meant to be used in the tests.
    r)r�LibcloudConnectionrN)rrrrr	rr)rrr	r
r
r�reset_debugDs
rc

Cst�d�}|rkd}ddlm}|dvr|rd}tj||dd�}t|�zdd	l}d
}Wnty6d}Ynw|rkt	|j
d�rkdd	l}z|j
j||j
d
�Wntyj}zdt|���vr`|�WYd	}~nd	}~wwtr�tjdkr�tjjj}d}	||	ks�Jd|	��d	Sd	Sd	S)a#
    Utility function that is ran once on Library import.

    This checks for the LIBCLOUD_DEBUG environment variable, which if it exists
    is where we will log debug information about the provider transports.

    This also checks for known environment/dependency incompatibilities.
    ZLIBCLOUD_DEBUG�ar)�PY3)z/dev/stderrz/dev/stdout�w�utf8)�encodingNTF�log_to_file)�filename�levelzillegal seekz2.6.0z2.3.0z�Known bad version of requests detected! This can happen when requests was installed from a source other than PyPI, e.g. via a package manager such as yum. Please either install requests from PyPI or run `pip install chardet==%s` to resolve this issue.)�os�getenvZlibcloud.utils.py3r�codecs�openr�paramiko�ImportError�hasattr�util�loggingr�DEBUG�OSError�str�lower�
have_requests�requestsrZpackagesZchardet)
�path�moderrr%Z
have_paramikor)�eZchardet_versionZrequired_chardet_versionr
r
r�
_init_onceQsD
	����

���r3)�__doc__r!rr#Z
libcloud.baserrrr/r.r&�__all__rrrr3r
r
r
r�<module>s&�
;