summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Svn.py23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Svn.py b/src/lib/Bcfg2/Server/Plugins/Svn.py
index 02656ffbe..04395e144 100644
--- a/src/lib/Bcfg2/Server/Plugins/Svn.py
+++ b/src/lib/Bcfg2/Server/Plugins/Svn.py
@@ -61,7 +61,7 @@ class Svn(Bcfg2.Server.Plugin.Version):
try:
if self.core.setup.cfp.get(
- "svn",
+ "svn",
"always_trust").lower() == "true":
self.client.callback_ssl_server_trust_prompt = \
self.ssl_server_trust_prompt
@@ -70,29 +70,32 @@ class Svn(Bcfg2.Server.Plugin.Version):
"certificate trust")
try:
- if (self.core.setup.cfp.get("svn", "user") and
+ if (self.core.setup.cfp.get("svn", "user") and
self.core.setup.cfp.get("svn", "password")):
self.client.callback_get_login = \
self.get_login
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
- self.logger.info("Svn: Using subversion cache for "
+ self.logger.info("Svn: Using subversion cache for "
"password-based authetication")
self.logger.debug("Svn: Initialized svn plugin with SVN directory %s" %
self.vcs_path)
-
+ # pylint: disable=W0613
def get_login(self, realm, username, may_save):
- self.logger.debug("Svn: Logging in with username: %s" %
+ """ PySvn callback to get credentials for HTTP basic authentication """
+ self.logger.debug("Svn: Logging in with username: %s" %
self.core.setup.cfp.get("svn", "user"))
return True, \
- self.core.setup.cfp.get("svn", "user"), \
- self.core.setup.cfp.get("svn", "password"), \
- False
+ self.core.setup.cfp.get("svn", "user"), \
+ self.core.setup.cfp.get("svn", "password"), \
+ False
+ # pylint: enable=W0613
def ssl_server_trust_prompt(self, trust_dict):
- self.logger.debug("Svn: Trusting SSL certificate from %s, "
+ """ PySvn callback to always trust SSL certificates from SVN server """
+ self.logger.debug("Svn: Trusting SSL certificate from %s, "
"issued by %s for realm %s" %
- (trust_dict['hostname'],
+ (trust_dict['hostname'],
trust_dict['issuer_dname'],
trust_dict['realm']))
return True, trust_dict['failures'], False