From 7d7dd7f014db7100a2d8b209822fd7c8f3f245d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Fri, 19 Aug 2016 17:00:21 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=B3=D0=BE=D1=82=D0=BE?= =?UTF-8?q?=D0=B2=D0=BA=D0=B0=20=D0=BA=20alpha?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/server/server.py | 10 +++++----- pym/server/variables/server.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pym/server/server.py b/pym/server/server.py index cbdffa1..9f2a311 100644 --- a/pym/server/server.py +++ b/pym/server/server.py @@ -17,7 +17,7 @@ import sys from calculate.core.server.func import MethodsInterface from calculate.lib.utils.openrc import OpenRC, OpenRCError -from calculate.lib.configparser import (ConfigParserLocked, +from calculate.lib.configparser import (ConfigParserCaseSensLocked, Error as ConfigParserError) import os from os import path @@ -90,13 +90,13 @@ class Server(MethodsInterface): :return: """ cp_path = self.clVars.Get('server.cl_server_env_path') - cp = ConfigParserLocked(cp_path) + cp = ConfigParserCaseSensLocked(cp_path) try: with cp.lock_write() as cp: if service not in cp: cp.add_section(service) - cp[service]["dn"] = binddn - cp[service]["pass"] = cred + cp[service]["DN"] = binddn + cp[service]["PASS"] = cred except ConfigParserError: raise ServerError(_("Failed to save server parameters")) return True @@ -115,7 +115,7 @@ class Server(MethodsInterface): except OSError: raise ServerError(_("Failed to clear server config")) - cp = ConfigParserLocked(cp_path) + cp = ConfigParserCaseSensLocked(cp_path) try: with cp.lock_write() as cp: if service in cp: diff --git a/pym/server/variables/server.py b/pym/server/variables/server.py index e1bc7a2..1aef3b0 100644 --- a/pym/server/variables/server.py +++ b/pym/server/variables/server.py @@ -38,7 +38,7 @@ class VariableClServerEnvPath(Variable): """ Путь до файла хранящий учётные записи сервера """ - value = "/etc/calculate/server.env" + value = "/etc/calculate/calculate.ldap" class VariableSrLdapSet(Variable):