fix check for checkout deployment
I may be missing something, but for such directory:
[maszyman@dylanjr tmp]$ ls -lrta Gaudi/
total 0
drwxrwxr-x. 3 maszyman maszyman 60 Feb 3 07:28 InstallArea
-rw-rw-r--. 1 maszyman maszyman 0 Feb 3 07:36 src
-rw-rw-r--. 1 maszyman maszyman 0 Feb 3 07:38 .cvmfscatalog
drwxrwxr-x. 2 maszyman maszyman 40 Feb 3 09:38 alg
the previous method to check for any file in the directory apart from InstallArea
and .cvmfscatalog
gives me:
>>> any(Path("Gaudi").glob("*[!InstallArea][!.cvmfscatalog]*"))
False
so I changed it:
>>> deployment_dir = Path("Gaudi")
>>> any(filter(lambda item: item not in [deployment_dir / "InstallArea", deployment_dir / ".cvmfscatalog"], deployment_dir.iterdir()))
True
>>> list(filter(lambda item: item not in [deployment_dir / "InstallArea", deployment_dir / ".cvmfscatalog"], deployment_dir.iterdir()))
[PosixPath('Gaudi/alg'), PosixPath('Gaudi/src')]