summaryrefslogtreecommitdiffstats
path: root/pykolab/plugins
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-03-09 10:37:49 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-03-09 10:37:49 +0000
commit61714a5e0d99ba1bc08eeac7f0ead106d72abae3 (patch)
treebebe896d1e8bbf8a1e9590bcc20e8580461fb408 /pykolab/plugins
parent0ae2417b2c4a614fd70c512b1283be37dd0c31dd (diff)
downloadpykolab-61714a5e0d99ba1bc08eeac7f0ead106d72abae3.tar.gz
Correct some pylint conventions
Diffstat (limited to 'pykolab/plugins')
-rw-r--r--pykolab/plugins/__init__.py16
-rw-r--r--pykolab/plugins/defaultfolders/__init__.py4
-rw-r--r--pykolab/plugins/dynamicquota/__init__.py4
-rw-r--r--pykolab/plugins/recipientpolicy/__init__.py6
4 files changed, 15 insertions, 15 deletions
diff --git a/pykolab/plugins/__init__.py b/pykolab/plugins/__init__.py
index e21c1cc..d0ba88e 100644
--- a/pykolab/plugins/__init__.py
+++ b/pykolab/plugins/__init__.py
@@ -50,7 +50,7 @@ class KolabPlugins(object):
if os.path.isdir(plugin_path):
for plugin in os.listdir(plugin_path):
- if os.path.isdir('%s/%s/' %(plugin_path,plugin,)):
+ if os.path.isdir('%s/%s/' % (plugin_path,plugin,)):
self.plugins[plugin] = False
self.check_plugins()
@@ -63,7 +63,7 @@ class KolabPlugins(object):
"""
for plugin in self.plugins:
try:
- exec("from pykolab.plugins import %s" %(plugin))
+ exec("from pykolab.plugins import %s" % (plugin))
self.plugins[plugin] = True
self.load_plugins(plugins=[plugin])
except ImportError, e:
@@ -186,7 +186,7 @@ class KolabPlugins(object):
except AttributeError, e:
log.error(_("Cannot check options for plugin %s: %s") % (plugin,e))
else:
- log.debug(_("Not checking options for plugin %s: No function 'check_options()'") %(plugin), level=5)
+ log.debug(_("Not checking options for plugin %s: No function 'check_options()'") % (plugin), level=5)
def plugin_check_setting(self, func, option, val, plugins=[]):
"""
@@ -224,13 +224,13 @@ class KolabPlugins(object):
if hasattr(getattr(self,plugin),hook):
try:
- log.debug(_("Executing hook %s for plugin %s") %(hook,plugin), level=8)
- #print "retval = self.%s.%s(%r, %r)" %(plugin,hook, args, kw)
- exec("retval = self.%s.%s(*args, **kw)" %(plugin,hook))
+ log.debug(_("Executing hook %s for plugin %s") % (hook,plugin), level=8)
+ #print "retval = self.%s.%s(%r, %r)" % (plugin,hook, args, kw)
+ exec("retval = self.%s.%s(*args, **kw)" % (plugin,hook))
except TypeError, e:
- log.error(_("Cannot execute hook %s for plugin %s: %s") %(hook,plugin,e))
+ log.error(_("Cannot execute hook %s for plugin %s: %s") % (hook,plugin,e))
except AttributeError, e:
- log.error(_("Cannot execute hook %s for plugin %s: %s") %(hook,plugin,e))
+ log.error(_("Cannot execute hook %s for plugin %s: %s") % (hook,plugin,e))
return retval
diff --git a/pykolab/plugins/defaultfolders/__init__.py b/pykolab/plugins/defaultfolders/__init__.py
index 1d53406..cee1b02 100644
--- a/pykolab/plugins/defaultfolders/__init__.py
+++ b/pykolab/plugins/defaultfolders/__init__.py
@@ -44,11 +44,11 @@ class KolabDefaultfolders(object):
"""
if not kw.has_key('additional_folders'):
- log.error(_("Plugin %s called without required keyword %s.") %("defaultfolders", "additional_folders"))
+ log.error(_("Plugin %s called without required keyword %s.") % ("defaultfolders", "additional_folders"))
return {}
try:
- exec("additional_folders = %s" %(kw['additional_folders']))
+ exec("additional_folders = %s" % (kw['additional_folders']))
except Exception, e:
log.error(_("Could not parse additional_folders"))
return {}
diff --git a/pykolab/plugins/dynamicquota/__init__.py b/pykolab/plugins/dynamicquota/__init__.py
index d19a811..6115dcd 100644
--- a/pykolab/plugins/dynamicquota/__init__.py
+++ b/pykolab/plugins/dynamicquota/__init__.py
@@ -47,13 +47,13 @@ class KolabDynamicquota(object):
for keyword in [ 'used', 'current_quota', 'new_quota', 'default_quota' ]:
if not kw.has_key(keyword):
- log.warning(_("No keyword %s passed to set_user_folder_quota") %(keyword))
+ log.warning(_("No keyword %s passed to set_user_folder_quota") % (keyword))
return 0
else:
try:
kw[keyword] = (int)(kw[keyword])
except:
- log.error(_("Quota '%s' not an integer!") %(keyword))
+ log.error(_("Quota '%s' not an integer!") % (keyword))
return 0
# Escape the user without quota
diff --git a/pykolab/plugins/recipientpolicy/__init__.py b/pykolab/plugins/recipientpolicy/__init__.py
index 89f05d0..6621947 100644
--- a/pykolab/plugins/recipientpolicy/__init__.py
+++ b/pykolab/plugins/recipientpolicy/__init__.py
@@ -98,7 +98,7 @@ class KolabRecipientpolicy(object):
alternative_mail = []
- #print "%r" %(alternative_mail_routines)
+ #print "%r" % (alternative_mail_routines)
_domains = [ kw['primary_domain'] ] + kw['secondary_domains']
for number in alternative_mail_routines.keys():
@@ -108,7 +108,7 @@ class KolabRecipientpolicy(object):
except KeyError, e:
log.warning(_("Attribute substitution for 'alternative_mail' failed in Recipient Policy"))
- #log.debug(_("Appending additional mail address: %s") %(retval), level=8)
+ #log.debug(_("Appending additional mail address: %s") % (retval), level=8)
alternative_mail.append(utils.translate(retval, user_attrs['preferredlanguage']))
for _domain in kw['secondary_domains']:
@@ -118,7 +118,7 @@ class KolabRecipientpolicy(object):
except KeyError, e:
log.warning(_("Attribute substitution for 'alternative_mail' failed in Recipient Policy"))
- #log.debug(_("Appending additional mail address: %s") %(retval), level=8)
+ #log.debug(_("Appending additional mail address: %s") % (retval), level=8)
alternative_mail.append(utils.translate(retval, user_attrs['preferredlanguage']))
alternative_mail = utils.normalize(alternative_mail)