ó ÉPSMc@sSddlZddlZddlZde_de_dejfd„ƒYZdS(iÿÿÿÿNt PkgTarFilecBs&eZdZd„Zddd„ZRS(s PkgTarFile is a subclass of TarFile. It implements a small number of additional instance methods to improve the functionality of the TarFile class for the packaging classes. XXX - Push these changes upstream to Python maintainers? cOs*|jddƒtjj|||ŽdS(Nt errorleveli(t setdefaultttarfiletTarFilet__init__(tselftargstkwargs((s4/usr/lib/python2.7/vendor-packages/pkg/pkgtarfile.pyR/stcCs´|jdƒt|tjƒr(|}n|j|ƒ}|jƒratjj||j ƒ|_ n|ss|j }ntjj tjj||ƒƒ}|rÛtjj |ƒ rÛytj|tjƒWqÛtk r×qÛXny#|j|tjj||ƒƒWn¯tk rq}|jdkr%‚q°|jdkrN|jdd|jƒq°|jdd|j|jfƒn?tjk r¯}|jdkr˜‚q°|jdd|ƒnXdS(sExtract a member from the TarFile archive. This method allows you to specify a new filename and path, using the filename and path arguments, where the file will be extracted. This method is similar to extract(). Extract() only allows the caller to prepend a directory path to the filename specified in the TarInfo object, whereas this method allows the caller to additionally specify a file name. triis tarfile %sstarfile: %s %rs tarfile: %sN(t_checkt isinstanceRtTarInfot getmembertislnktostpathtjointlinknamet _link_targettnametdirnametexiststmakedirststattS_IRWXUtEnvironmentErrort_extract_memberRtfilenametNonet_dbgtstrerrort ExtractError(RtmemberRRttarinfot upperdirste((s4/usr/lib/python2.7/vendor-packages/pkg/pkgtarfile.pyt extract_to3s8    !   (t__name__t __module__t__doc__RR&(((s4/usr/lib/python2.7/vendor-packages/pkg/pkgtarfile.pyR's (RRRRtpwdtgrpRR(((s4/usr/lib/python2.7/vendor-packages/pkg/pkgtarfile.pyts