def extract_tar(self, suffix, path='.'):
        """
        Extract builds with .tar.(*) extension
        When unpacking a build archive, only extract the firefox directory

        @type suffix:
        @param suffix:

        @type path:
        @param path:
        """
        mode = suffix.split('.')[-1]
        tar_fd, tar_fn = tempfile.mkstemp(prefix='fuzzfetch-', suffix='.tar.%s' % mode)
        os.close(tar_fd)
        try:
            _download_url(self.artifact_url(suffix), tar_fn)
            LOG.info('.. extracting')
            with tarfile.open(tar_fn, mode='r:%s' % mode) as tar:
                members = []
                for member in tar.getmembers():
                    if member.path.startswith("firefox/"):
                        member.path = member.path[8:]
                        members.append(member)
                    elif member.path != "firefox":
                        # Ignore top-level build directory
                        members.append(member)
                tar.extractall(members=members, path=path)
        finally:
            os.unlink(tar_fn)
def extract_tar ( self , suffix , path = '.' ) : mode = suffix . split ( '.' ) [ - 1 ] tar_fd , tar_fn = tempfile . mkstemp ( prefix = 'fuzzfetch-' , suffix = '.tar.%s' % mode ) os . close ( tar_fd ) try : _download_url ( self . artifact_url ( suffix ) , tar_fn ) LOG . info ( '.. extracting' ) with tarfile . open ( tar_fn , mode = 'r:%s' % mode ) as tar : members = [ ] for member in tar . getmembers ( ) : if member . path . startswith ( "firefox/" ) : member . path = member . path [ 8 : ] members . append ( member ) elif member . path != "firefox" : members . append ( member ) tar . extractall ( members = members , path = path ) finally : os . unlink ( tar_fn )
Extract builds with .tar.(*) extension
        When unpacking a build archive, only extract the firefox directory

        @type suffix:
        @param suffix:

        @type path:
        @param path: