ó ôBQc@s<dZddlZddlmZdefd„ƒYZdS(s Class that holds state (bucket_storage_uri_class and debug) needed for instantiating StorageUri objects. The StorageUri func defined in this class uses that state plus gsutil default flag values to instantiate this frequently constructed object with just one param for most cases. iÿÿÿÿN(tCommandExceptiontStorageUriBuildercBseZd„Zed„ZRS(cCs||_||_dS(sÞ Args: debug: Debug level to pass in to boto connection (range 0..3). bucket_storage_uri_class: Class to instantiate for cloud StorageUris. Settable for testing/mocking. N(tbucket_storage_uri_classtdebug(tselfRR((s7/tmp/tmp.yUYbTOKr8o/gsutil/gslib/storage_uri_builder.pyt__init__s c Cs4tj|dd|jdtd|jdtd|ƒS(sn Instantiates StorageUri using class state and gsutil default flag values. Args: uri_str: StorageUri naming bucket or object. is_latest: boolean indicating whether this versioned object represents the current version. Returns: boto.StorageUri for given uri_str. Raises: InvalidUriError: if uri_str not valid. tfileRtvalidateRtsuppress_consec_slashest is_latest(tbotot storage_uriRtFalseR(Rturi_strR ((s7/tmp/tmp.yUYbTOKr8o/gsutil/gslib/storage_uri_builder.pyt StorageUri&s (t__name__t __module__RR R(((s7/tmp/tmp.yUYbTOKr8o/gsutil/gslib/storage_uri_builder.pyRs (t__doc__R tgslib.exceptionRtobjectR(((s7/tmp/tmp.yUYbTOKr8o/gsutil/gslib/storage_uri_builder.pyts