def _select_config_file_path():
"""
Return an openATTIC configuration pathname
"""
possible_paths = ("/etc/default/openattic", "/etc/sysconfig/openattic")
for path in possible_paths:
if os.access(path, os.F_OK) and os.access(path, os.R_OK | os.W_OK):
return path
raise CommandExecutionError(
("No openATTIC config file found in the following locations: "
"{}".format(possible_paths)))
评论列表
文章目录