mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-26 01:03:35 +05:00
feat: add deprecated decorator
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -24,6 +24,7 @@ from utils import (
|
||||
NGINX_CONFD,
|
||||
NGINX_SITES_ENABLED,
|
||||
)
|
||||
from utils.decorators import deprecated
|
||||
from utils.logger import Logger
|
||||
|
||||
|
||||
@@ -59,6 +60,7 @@ def create_symlink(source: Path, target: Path, sudo=False) -> None:
|
||||
raise
|
||||
|
||||
|
||||
@deprecated(info="Use remove_with_sudo instead", replaced_by=remove_with_sudo)
|
||||
def remove_file(file_path: Path, sudo=False) -> None:
|
||||
try:
|
||||
cmd = f"{'sudo ' if sudo else ''}rm -f {file_path}"
|
||||
|
||||
Reference in New Issue
Block a user