diff options
| author | Egor Tensin <egor@tensin.name> | 2026-10-12 13:09:09 +0500 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-10-12 13:09:09 +0500 |
| commit | 59e69c1d68f6e1c92e3ea34433ceeb1a2c83b94d (patch) | |
| tree | d4b5be7d175a95017efbfe449adad37c32289b35 /project/utils.py | |
| parent | README: update (diff) | |
| download | cmake-common-59e69c1d68f6e1c92e3ea34433ceeb1a2c83b94d.tar.gz cmake-common-59e69c1d68f6e1c92e3ea34433ceeb1a2c83b94d.zip | |
use contextlib.chdir
Diffstat (limited to 'project/utils.py')
| -rw-r--r-- | project/utils.py | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/project/utils.py b/project/utils.py index 87ac8d1..d3a9b10 100644 --- a/project/utils.py +++ b/project/utils.py @@ -77,16 +77,6 @@ def setup_logging(verbose=False): sys.exit(1) -@contextmanager -def cd(path): - cwd = os.getcwd() - os.chdir(path) - try: - yield - finally: - os.chdir(cwd) - - def run(cmd, **kwargs): logging.info("Running: %s", shlex.join(cmd)) return subprocess.run(cmd, check=True, **kwargs) |
