Clean up the temporary workspace if one exists
765082
def clean_workspace(self):
        ''''''
        if os.path.isdir(self._temp_workspace):
            shutil.rmtree(self._temp_workspace)
53318
def cleanup(config_dir):
    """"""
    stdout_path = os.path.join(config_dir, 'pueue.stdout')
    stderr_path = os.path.join(config_dir, 'pueue.stderr')
    if os._exists(stdout_path):
        os.remove(stdout_path)
    if os._exists(stderr_path):
        os.remove(stderr_path)

    socketPath = os.path.join(config_dir, 'pueue.sock')
    if os.path.exists(socketPath):
        os.remove(socketPath)
52274
def ensure_workspace(self, target):
    
    gopath = self.get_gopath(target)
    for d in ('bin', 'pkg', 'src'):
      safe_mkdir(os.path.join(gopath, d))
    required_links = set()
    for dep in target.closure():
      if not isinstance(dep, GoTarget):
        continue
      if self.is_remote_lib(dep):
        self._symlink_remote_lib(gopath, dep, required_links)
      else:
        self._symlink_local_src(gopath, dep, required_links)
    self.remove_unused_links(os.path.join(gopath, 'src'), required_links)
201882
def cleanup(self):
        ""
        log.info('Removing temp dir %s', self._tempdir.name)
        self._tempdir.cleanup()
1371178
def create_temporary_workspace(version=None, mode=0700):
    # type: (str, int) -> str
    
    workspace = mkdtemp('hemp_')
    if version is not None:
        workspace = join(workspace, version)
        mkdir(workspace, mode)
    chmod(workspace, mode)
    return workspace
1233161
def cleanup(temp_name):
    '''  '''
    for filename in iglob(temp_name + '*' if temp_name else temp_name):
        try:
            os.remove(filename)
        except OSError:
            pass
601351
def clean():
    """"""
    shutil.rmtree('{PROJECT_NAME}.egg-info'.format(PROJECT_NAME=PROJECT_NAME), ignore_errors=True)
    shutil.rmtree('build', ignore_errors=True)
    shutil.rmtree('dist', ignore_errors=True)
    shutil.rmtree('htmlcov', ignore_errors=True)
    shutil.rmtree('__pycache__', ignore_errors=True)
1334795
def thaw(self, tmp_dir):
        """"""
        for resource in self.resources():
            if resource.present:
                resource.thaw(tmp_dir)
151913
def cleanup(config=None, path=None):
    """"""
    if config is None:
        config = parse()
    if path is None:
        path = os.getcwd()
    root = config.get('root', 'path')
    root = os.path.join(path, root)
    if sys.path[0] == root:
        sys.path.remove(root)
1204932
function cleanup()
    {
        // destroy loop variable(s)
        foreach ( $this->LoopVariablesNames as $varName )
            $this->Tpl->unsetVariable( $varName, $this->RootNamespace );
    }
882573
private void cleanJobDirectory() {
    try {
      FileSystem jobfs = jobDirectory.getFileSystem(conf);
      jobfs.delete(jobDirectory, true);
    } catch(IOException ioe) {
      LOG.warn("Unable to clean tmp directory " + jobDirectory, ioe);
    }
  }
378178
def clean_jobs(self, recursive=False):
        """"""
        self._interface.clean_jobs(self.scatter_link,
                                   clean_all=recursive)
507566
def clear(self, ts=None):
        
        sp_key = "%s:session_prepare" % self.namespace(ts or int(time.time()))
        return self.r.delete(sp_key)
663288
def cleanup_environment():
    
    SERV.terminate()
    shutil.rmtree(TMP_PATH)
    if os.path.exists(TMP_PATH):
        os.rmdir(TMP_PATH)

    global TMP_PATH
    TMP_PATH = None
108591
def delete(self):
        
        r = fapi.delete_workspace(self.namespace, self.name)
        fapi._check_response_code(r, 202)
1017809
def clean():
        
        shutil.rmtree(BUILD_PATH, ignore_errors=True)
        shutil.rmtree(os.path.join(SOURCE_PATH, 'reference', 'api'),
                      ignore_errors=True)
449439
def _clean():
    
    LOGGER.info('Cleaning project directory...')
    folders_to_cleanup = [
        '.eggs',
        'build',
        f'{config.PACKAGE_NAME()}.egg-info',
    ]
    for folder in folders_to_cleanup:
        if os.path.exists(folder):
            LOGGER.info('\tremoving: %s', folder)
            shutil.rmtree(folder)