def create(self, package, devpi_user='', devpi_index=''): parent = local.cwd / ('devpi-cloud-test-' + package) if parent.exists(): log.error("%s already exists - aborting", parent) exit(1) log.info("create new cloud test in %s", parent) try: blueprint_path = LocalPath(__file__).dirname / 'blueprint' blueprint_path.copy(parent) with local.cwd(parent): self.__render(Config.rel_ini_path, PACKAGE=package, DEVPI_USER=devpi_user, DEVPI_INDEX=devpi_index) self._init_repository(parent) except Exception: log.exception("creation failed") parent.delete() exit(1)