From b75c3dd76e6322bb7125f69489e62d2e7211fbfb Mon Sep 17 00:00:00 2001 From: mprahl Date: Mon, 29 Apr 2019 15:35:29 -0400 Subject: [PATCH] Remove SCM.is_available since it's not used --- module_build_service/scm.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/module_build_service/scm.py b/module_build_service/scm.py index 2848ffac..a0513cf1 100644 --- a/module_build_service/scm.py +++ b/module_build_service/scm.py @@ -298,29 +298,6 @@ class SCM(object): else: raise RuntimeError("is_full_commit_hash: Unhandled SCM scheme.") - def is_available(self, strict=False): - """Check whether the scmurl is available for checkout. - - :param bool strict: When True, raise expection on error instead of - returning False. - :returns: bool -- the scmurl is available for checkout - """ - td = None - try: - td = tempfile.mkdtemp() - self.checkout(td) - return True - except Exception: - if strict: - raise - return False - finally: - try: - if td is not None: - shutil.rmtree(td) - except Exception as e: - log.warning("Failed to remove temporary directory {!r}: {}".format(td, str(e))) - @property def url(self): """The original scmurl."""