cloner.detector_enabled

Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
2022-08-03 07:02:49 +02:00
parent ff1e90982a
commit 52c3d03e2f
2 changed files with 15 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ class Cloner:
_dirs: RepoDirStructure = None
_config: ClonerConfig = None
_interval_file: str = "last-check-time"
__detector_cfg = "detector.cfg"
__submodule_cache: str = None
_repo: RepoTool = None
_repo_url: str = ""
@@ -202,3 +203,7 @@ class Cloner:
scan_depth_limit = None
# another levels are handled internally as non-recursive clones and discovers by repo-tool
return self._repo.clone_recursive(url, self.__submodule_cache, scan_depth = scan_depth_limit)
@property
def detector_enabled(self) -> bool:
return os.path.exists(os.path.join(self._dirs.conf_dir, self.__detector_cfg))