(self, tarfile, sourcedir=None)
return not status
Create a tar file for a given sourcedir
Create a tar file for a given sourcedir
Create a tar file for a given sourcedir
def tar(self, tarfile, sourcedir=None):
        """Create a tar file for a given sourcedir"""
        #cmd += r" --xform 's:^\./::' "
        if sourcedir is None:
            sourcedir = self.filename
        verbose = ''
        if Msg.level >= Msg.VER:
            verbose = 'v'
        cmd = ["tar", "-C", sourcedir, "-c" + verbose, "--one-file-system",
               "-S", "--xattrs", "-f", tarfile, "."]
        status = Uprocess().call(cmd, stderr=Msg.chlderr, close_fds=True)
        if status:
            Msg().err("Error: creating tar file:", tarfile)
        return not status
def tar ( self , tarfile , sourcedir = None ) : #cmd += r" --xform 's:^\./::' " if sourcedir is None : sourcedir = self . filename verbose = '' if Msg . level >= Msg . VER : verbose = 'v' cmd = [ "tar" , "-C" , sourcedir , "-c" + verbose , "--one-file-system" , "-S" , "--xattrs" , "-f" , tarfile , "." ] status = Uprocess ( ) . call ( cmd , stderr = Msg . chlderr , close_fds = True ) if status : Msg ( ) . err ( "Error: creating tar file:" , tarfile ) return not status