summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Svn.py
diff options
context:
space:
mode:
authorJason Kincl <kincljc@ornl.gov>2013-06-14 14:02:18 -0400
committerJason Kincl <kincljc@ornl.gov>2013-06-17 10:14:56 -0400
commit06b398542a5bf4a073f407a0fe96b5fed8d8a90a (patch)
treed52e831153ea54af79d2e7d38b66fec17aef7938 /src/lib/Bcfg2/Server/Plugins/Svn.py
parent98bfb01afb27cd0de0dac5c7a6190ac22fa1d0f3 (diff)
downloadbcfg2-06b398542a5bf4a073f407a0fe96b5fed8d8a90a.tar.gz
bcfg2-06b398542a5bf4a073f407a0fe96b5fed8d8a90a.tar.bz2
bcfg2-06b398542a5bf4a073f407a0fe96b5fed8d8a90a.zip
Svn: Fixing pep8 and pylint checks
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Svn.py')
-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