Добавлена проверка существования .git в контейнере
master 3.7.2.69
root 1 year ago
parent f4dc9ce9d4
commit a86bd7f1ff

@ -199,7 +199,8 @@ def get_synchronization_tasks(object_name):
'foreach': 'update.cl_update_other_rep_name',
'message': __("Syncing the {eachvar:capitalize} repository"),
'method': Object('syncOtherRepository(eachvar)'),
'condition': lambda GetBool: GetBool('update.cl_update_other_set')
'condition': lambda GetBool: (GetBool('update.cl_update_other_set') or
not GetBool('update.cl_update_other_git_exists'))
},
{'name': 'trim_reps',
'foreach': 'update.cl_update_sync_rep',

@ -679,6 +679,21 @@ class VariableClUpdateOtherSet(Variable):
return self.value
class VariableClUpdateOtherGitExists(Variable):
"""
Проверка, существует ли папка .git в профиле контейнера
"""
type = 'bool'
repos_path = 'cl_update_repos_storage'
def get(self):
rep = f"{self.Get(self.repos_path)}/container"
if os.path.exists(os.path.join(rep, '.git')):
return True
return False
class VariableClUpdateOtherRepData(ReadonlyTableVariable):
"""
Информация о прочих репозиториях

Loading…
Cancel
Save