You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calculate-utils-2.1-client/pym/cl_fill_client.py

36 lines
1.4 KiB

#-*- coding: utf-8 -*-
#Copyright 2008 Calculate Pack, http://www.calculate-linux.ru
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
class fillVars(object):
def get_cl_profile_path(self):
"""список накладываемых профилей при установке, наложении профилей"""
profpath = []
profPaths = ['/usr/lib/calculate/calculate-client/profile',
'/var/calculate/remote/client-profile',
'/var/calculate/client-profile'
]
for profPath in profPaths:
if os.path.exists(profPath):
paths = os.listdir(profPath)
for path in paths:
ph = os.path.join(profPath,path)
if os.path.exists(ph) and os.listdir(ph):
profpath.append(ph)
return profpath