def exist(self):
with settings(warn_only=True):
with hide('commands'):
result = local('systemctl list-unit-files', capture=True)
for line in result.split('\n'):
if line.startswith(self.name):
return True
return False
评论列表
文章目录