def remove_virtualenv(virtualenv_path, logger=None):
 logger = (logger or LOG)
 if (not os.path.exists(virtualenv_path)):
  logger.info(('Virtualenv path "%s" doesn\'t exist' % virtualenv_path))
  return True
 logger.debug(('Removing virtualenv in "%s"' % virtualenv_path))
 try:
  shutil.rmtree(virtualenv_path)
 except Exception as e:
  logger.error(('Error while removing virtualenv at "%s": "%s"' % (virtualenv_path, e)))
  raise e
 return True

def remove_virtualenv ( virtualenv_path , logger = None ) : logger = ( logger or LOG ) if ( not os . path . exists ( virtualenv_path ) ) : logger . info ( ( 'Virtualenv path "%s" doesn\'t exist' % virtualenv_path ) ) return True logger . debug ( ( 'Removing virtualenv in "%s"' % virtualenv_path ) ) try : shutil . rmtree ( virtualenv_path ) except Exception as e : logger . error ( ( 'Error while removing virtualenv at "%s": "%s"' % ( virtualenv_path , e ) ) ) raise e return True
remove the provided virtualenv .