View file File name : S3Uri.cpython-38.pyc Content :U @tJ[� � @ s d dl mZmZ d dlZd dlZd dlZddlmZmZm Z ddl mZ ejdkrXdZ ndZ G d d � d e�ZG dd� de�ZG d d� de�ZG dd� de�ZG dd� de�Zedk�red�Zedee�� ede� edej� ede�� � ede�� � e� ed�Zedee�� ede� edej� ede�� � e� ed�Zedee�� ede� edej� ede�� � e� ed�Zedee�� ede� edej� ede�� � e� ed�Zedee�� ede� edej� ede�� � e� dS ) � )�absolute_import�print_functionN� )� unicodise�deunicodise�check_bucket_name_dns_support)�Config)� r TFc @ sD e Zd ZdZdZdd� Zdd� Zdd� Zdd � Zd d� Z dd � Z dS )�S3UriNc C s� | j sbg | _ tjt j}|D ]D}t|| �t| �k r6qt|| | �r|| | kr| j �|| � q| j D ]<}zt� |�}|� |� |W S tk r� Y qhY qhX qhtd| ��d S )Nz%s: not a recognized URI)�_subclasses�sys�modules�__name__�__dict__�type� issubclass�append�object�__new__�__init__� ValueError)�self�string�dictZ something�subclass�instance� r �*/usr/lib/python3/dist-packages/S3/S3Uri.pyr s z S3Uri.__new__c C s t r| �� S t| �� �S d S �N)�PY3�urir �r r r r �__str__- s z S3Uri.__str__c C s | � � S r )r r! r r r �__unicode__3 s zS3Uri.__unicode__c C s t d| jj| �� f �S )Nz<%s: %s>)�repr� __class__r r# r! r r r �__repr__6 s zS3Uri.__repr__c C s t d��d S )Nz6This S3 URI does not have Anonymous URL representation)r r! r r r � public_url9 s zS3Uri.public_urlc C s | � � �d�d S )N�/���)r# �splitr! r r r �basename<