From f47a17f2760a552b5d812b4efdb4dffddb5eab24 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 7 Mar 2023 18:03:11 +0200 Subject: [PATCH] Fixed for none repo packages --- slpkg/slackbuild.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/slpkg/slackbuild.py b/slpkg/slackbuild.py index 6d2ff1e4..ad0ae5fb 100644 --- a/slpkg/slackbuild.py +++ b/slpkg/slackbuild.py @@ -147,10 +147,12 @@ class Slackbuilds(Configs): path_ponce_repo_package = Path(self.ponce_repo_path, location, sbo) path_build_package = Path(self.build_path, sbo) - shutil.copytree(path_ponce_repo_package, f'{self.build_path}{sbo}') - slackbuild = Path(path_build_package, f'{sbo}.SlackBuild') - os.chmod(slackbuild, 0o775) - + if path_ponce_repo_package.is_dir(): + shutil.copytree(path_ponce_repo_package, f'{self.build_path}{sbo}') + slackbuild = Path(path_build_package, f'{sbo}.SlackBuild') + os.chmod(slackbuild, 0o775) + else: + raise SystemExit(f"Error: path {path_ponce_repo_package} does not exist.") else: sbo_url: str = f'{self.sbo_repo_url}{location}/{file}' down_sbo = Downloader(self.tmp_slpkg, sbo_url, self.flags)