File manager - Edit - /home/u478019808/domains/bestandroidphones.store/public_html/static/img/logo/exception.cpython-39.pyc.tar
Back
opt/gsutil/gslib/__pycache__/exception.cpython-39.pyc 0000644 00000013537 15025234162 0016625 0 ustar 00 a +(Wg� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZdZed Zed Z ej rZeZG d d� de�Z G dd � d e�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZdS )zagsutil exceptions. The exceptions in this module are for use across multiple different classes. � )�absolute_import)�print_function)�division)�unicode_literalsNzNo URLs matchedz). Do the files you're operating on exist?z: %sc @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �AbortExceptionzGException raised when a user aborts a command that needs to do cleanup.c C s t �| � || _d S �N)� StandardError�__init__�reason)�selfr � r �/opt/gsutil/gslib/exception.pyr / s zAbortException.__init__c C s d| j S �NzAbortException: %s�r �r r r r �__repr__3 s zAbortException.__repr__c C s d| j S r r r r r r �__str__6 s zAbortException.__str__N��__name__� __module__�__qualname__�__doc__r r r r r r r r , s r c @ s* e Zd ZdZd dd�Zdd� Zdd� Zd S )�CommandExceptional Exception raised when a problem is encountered running a gsutil command. This exception should be used to signal user errors or system failures (like timeouts), not bugs (like an incorrect param value). For the latter you should raise Exception so we can see where/how it happened via gsutil -D (which will include a stack trace for raised Exceptions). Fc C s t �| � || _|| _dS )z�Instantiate a CommandException. Args: reason: Text describing the problem. informational: Indicates reason should be printed as FYI, not a failure. N)r r r � informational)r r r r r r r C s zCommandException.__init__c C s t | �S r ��strr r r r r N s zCommandException.__repr__c C s d| j S )NzCommandException: %sr r r r r r Q s zCommandException.__str__N)Fr r r r r r : s r c @ s e Zd ZdZdS )�ControlCExceptionz�Exception to report to analytics when the user exits via ctrl-C. This exception is never actually raised, but is used by analytics collection to provide a more descriptive name for user exit. N�r r r r r r r r r U s r c @ s e Zd ZdZdS )�GcloudStorageTranslationErrorzEException raised when a gsutil command can't be translated to gcloud.Nr r r r r r ^ s r c @ s e Zd ZdZdS )�HashMismatchExceptionz6Exception raised when data integrity validation fails.Nr r r r r r c s r c @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �&IamChOnResourceWithConditionsExceptiona� Raised when trying to use "iam ch" on an IAM policy with conditions. Because the syntax for conditions is fairly complex, it doesn't make sense to specify them on the command line using a colon-delimited set of values in the same way you'd specify simple bindings - it would be a complex and potentially surprising interface, which isn't what you want when dealing with permissions. Additionally, providing partial functionality -- e.g. if a policy contains bindings with conditions, still allow users to interact with bindings that don't contain conditions -- might sound tempting, but results in a bad user experience. Bindings can be thought of as a mapping from (role, condition) -> [members]. Thus, a user might think they're editing the binding for (role1, condition1), but they'd really be editing the binding for (role1, None). Thus, we just raise an error if we encounter a binding with conditions present, and encourage users to use "iam {get,set}" instead. c C s t �| |� || _d S r �� Exceptionr �message�r r# r r r r z s z/IamChOnResourceWithConditionsException.__init__c C s t | �S r r r r r r r ~ s z/IamChOnResourceWithConditionsException.__repr__c C s d| j S )Nz*IamChOnResourceWithConditionsException: %s�r# r r r r r � s z.IamChOnResourceWithConditionsException.__str__Nr r r r r r h s r c @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �InvalidUrlErrorz%Exception raised when URL is invalid.c C s t �| |� || _d S r r! r$ r r r r � s zInvalidUrlError.__init__c C s t | �S r r r r r r r � s zInvalidUrlError.__repr__c C s d| j S )NzInvalidUrlError: %sr% r r r r r � s zInvalidUrlError.__str__Nr r r r r r&