def pipenv_lock(self):
with cwd(self.workdir):<EOL><INDENT>self.pipfile.to_file()<EOL>_LOGGER.debug("<STR_LIT>")<EOL>try:<EOL><INDENT>result = run_command("<STR_LIT>", env={"<STR_LIT>": "<STR_LIT:1>"})<EOL><DEDENT>except CommandError as exc:<EOL><INDENT>_LOGGER.exception(<EOL>"<STR_LIT>", exc.return_code, exc.stdout, exc.stderr<EOL>)<EOL>raise UnableLock("<STR_LIT>") from exc<EOL><DEDENT>_LOGGER.debug("<STR_LIT>", result.stdout)<EOL>_LOGGER.debug("<STR_LIT>", result.stderr)<EOL>self.pipfile_lock = PipfileLock.from_file(pipfile=self.pipfile)<EOL><DEDENT>
Perform pipenv lock on the current state of project.