HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/duplicity/backends/__pycache__/hubicbackend.cpython-310.pyc
o

�~�_�	�@snddlmZddlZddlmZddlmZddlmZddlZddl	m
Z
Gdd	�d	e
�Zej�
d
e�dS)�)�strN)�log)�util)�BackendException�)�PyraxBackendc@seZdZdZdd�ZdS)�HubicBackendz'
    Backend for Hubic using Pyrax
    c
Cs�tjj�||�zddl}Wnty"}ztdt|���d}~ww|�dd�t	j
�d�}t	j
�|�r`z|�
|�Wn'ty_}zt�d|jjt�|�ftjj�WYd}~n	d}~wwtd��|j
�d�}|jj|_|jj|_|j�|�|_dS)	NrzPHubic backend requires the pyrax library available from Rackspace.
Exception: %s�
identity_typez5duplicity.backends.pyrax_identity.hubic.HubicIdentityz~/.hubic_credentialsz7Connection failed, please check your credentials: %s %sz#No ~/.hubic_credentials file found.�/) �	duplicity�backend�Backend�__init__�pyrax�ImportErrorrr�set_setting�os�path�
expanduser�exists�set_credential_file�	Exceptionr�
FatalError�	__class__�__name__r�uexc�	ErrorCode�connection_failed�lstrip�
exceptions�ClientException�
client_exc�NoSuchObject�nso_exc�
cloudfiles�create_container�	container)�self�
parsed_urlr�e�CREDENTIALS_FILEr&�r+�A/usr/lib/python3/dist-packages/duplicity/backends/hubicbackend.pyr$s6�������

zHubicBackend.__init__N)r�
__module__�__qualname__�__doc__rr+r+r+r,r srzcf+hubic)�builtinsrrrrr�duplicity.errorsr�duplicity.backend�	_cf_pyraxrrr�register_backendr+r+r+r,�<module>s$