|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /opt/cppython/lib/python3.8/site-packages/oauth2client/__pycache__/ |
U
O��g�
� @ sB d Z ddlZddlZddlmZ ddlmZ G dd� dej�ZdS )zYUtilities for OAuth.
Utilities for making it easier to work with OAuth 2.0
credentials.
� N)�_helpers)�clientc s@ e Zd ZdZ� fdd�Zdd� Zdd� Zdd � Zd
d� Z� Z S )�Storagez:Store and retrieve a single credential to and from a file.c s t t| �jt�� d� || _d S )N)�lock)�superr �__init__� threading�Lock� _filename)�self�filename�� __class__� �>/opt/cppython/lib/python3.8/site-packages/oauth2client/file.pyr s zStorage.__init__c C s~ d}t �| j� z t| jd�}|�� }|�� W n tk
rH | Y S X ztj� |�}|�
| � W n tk
rx Y nX |S )z�Retrieve Credential from file.
Returns:
oauth2client.client.Credentials
Raises:
IOError if the file is a symbolic link.
N�rb)r �
validate_filer
�open�read�close�IOErrorr �CredentialsZ
new_from_jsonZ set_store�
ValueError)r �credentials�f�contentr r r �
locked_get# s
zStorage.locked_getc C s>