tmt/utils.py
def write(self, path, data):
        """ Write a file to the workdir """
        path = os.path.join(self.workdir, path)
        self.debug(f"Write file '{path}'.")
        # Dry mode
        if self.opt('dry'):
            return
        try:
            with open(path, 'w') as target:
                return target.write(data)
        except OSError as error:
            raise GeneralError(f"Failed to write '{path}'.\n{error}")
 Write a file to the workdir 
Write a file to the workdir
Write a file to the workdir
def write(self, path, data):
        path = os.path.join(self.workdir, path)
        self.debug(f"Write file '{path}'.")
        if self.opt('dry'):
            return
        try:
            with open(path, 'w') as target:
                return target.write(data)
        except OSError as error:
            raise GeneralError(f"Failed to write '{path}'.\n{error}")
def write ( self , path , data ) : path = os . path . join ( self . workdir , path ) self . debug ( f"Write file '{path}'." ) if self . opt ( 'dry' ) : return try : with open ( path , 'w' ) as target : return target . write ( data ) except OSError as error : raise GeneralError ( f"Failed to write '{path}'.\n{error}" )
Write a file to the workdir
Write a file to the workdir
""" Write a file to the workdir """ # Dry mode
self
path
data