From 06b398542a5bf4a073f407a0fe96b5fed8d8a90a Mon Sep 17 00:00:00 2001 From: Jason Kincl Date: Fri, 14 Jun 2013 14:02:18 -0400 Subject: Svn: Fixing pep8 and pylint checks --- src/lib/Bcfg2/Server/Plugins/Svn.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/lib') 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 -- cgit v1.2.3-1-g7c22