From 3ca3c6782864513a7382118b1896535854a1bfcc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 27 Oct 2021 17:15:45 +0530 Subject: [PATCH] Remove unused code --- kitty/shell_integration.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/kitty/shell_integration.py b/kitty/shell_integration.py index 387889f34..8ca8826b1 100644 --- a/kitty/shell_integration.py +++ b/kitty/shell_integration.py @@ -3,7 +3,6 @@ import os -import time from contextlib import suppress from typing import Optional, Union, Dict @@ -60,18 +59,6 @@ def setup_bash_integration(env: Dict[str, str]) -> None: setup_integration('bash', os.path.expanduser('~/.bashrc')) -def atomic_symlink(destination: str, in_directory: str) -> None: - os.makedirs(in_directory, exist_ok=True) - name = os.path.basename(destination) - tmpname = os.path.join(in_directory, f'{name}-{os.getpid()}-{time.monotonic()}') - os.symlink(destination, tmpname) - try: - os.replace(tmpname, os.path.join(in_directory, name)) - except OSError: - os.unlink(tmpname) - raise - - def setup_fish_integration(env: Dict[str, str]) -> None: if 'XDG_DATA_DIRS' in env: val = env.get('XDG_DATA_DIRS', '')