summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2011-04-07 16:53:52 +0200
committerMartin Kosek <mkosek@redhat.com>2011-04-13 15:58:45 +0200
commit1ac3ed2c271accc0776a3cc34fbe607acf62da17 (patch)
treebf1be818d135e75556e2b6864cb77e663bf9369d /ipalib
parentfb329bc8b0dcde54b113fd0cc4b03ab9c11febd0 (diff)
downloadfreeipa-1ac3ed2c271accc0776a3cc34fbe607acf62da17.tar.gz
freeipa-1ac3ed2c271accc0776a3cc34fbe607acf62da17.tar.xz
freeipa-1ac3ed2c271accc0776a3cc34fbe607acf62da17.zip
Fix lint false positives.
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/backend.py2
-rw-r--r--ipalib/cli.py4
-rw-r--r--ipalib/compat.py2
-rw-r--r--ipalib/frontend.py8
-rw-r--r--ipalib/parameters.py4
-rw-r--r--ipalib/plugins/baseldap.py5
-rw-r--r--ipalib/plugins/cert.py2
7 files changed, 17 insertions, 10 deletions
diff --git a/ipalib/backend.py b/ipalib/backend.py
index 2262e9227..79f190832 100644
--- a/ipalib/backend.py
+++ b/ipalib/backend.py
@@ -139,4 +139,4 @@ class Executioner(Backend):
if error is None:
return result
assert isinstance(error, PublicError)
- raise error
+ raise error #pylint: disable=E0702
diff --git a/ipalib/cli.py b/ipalib/cli.py
index 60afb7d02..003df4953 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -587,9 +587,9 @@ class textui(backend.Backend):
except EOFError:
return -2
- if resp.lower() == "q":
+ if resp.lower() == "q": #pylint: disable=E1103
return -2
- if resp.lower() == "a":
+ if resp.lower() == "a": #pylint: disable=E1103
return -1
try:
selection = int(resp) - 1
diff --git a/ipalib/compat.py b/ipalib/compat.py
index 614644feb..36d038444 100644
--- a/ipalib/compat.py
+++ b/ipalib/compat.py
@@ -75,7 +75,7 @@ else:
import simplejson as json
from cgi import parse_qs
try:
- from hashlib import sha1, md5
+ from hashlib import sha1, md5 #pylint: disable=E0611
except ImportError:
from sha import new as sha1
from md5 import new as md5
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index 78345e742..ebf40309d 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -383,15 +383,15 @@ class Command(HasParam):
takes_options = tuple()
takes_args = tuple()
- args = None
- options = None
+ args = lambda: None
+ options = lambda: None
params = None
obj = None
use_output_validation = True
output = None
has_output = ('result',)
- output_params = None
+ output_params = lambda: None
has_output_params = tuple()
msg_summary = None
@@ -1020,7 +1020,7 @@ class Object(HasParam):
backend = None
methods = None
properties = None
- params = None
+ params = lambda: None
primary_key = None
params_minus_pk = None
diff --git a/ipalib/parameters.py b/ipalib/parameters.py
index 47d532227..ef62aabf7 100644
--- a/ipalib/parameters.py
+++ b/ipalib/parameters.py
@@ -479,7 +479,7 @@ class Param(ReadOnly):
else:
value = self.convert(self.normalize(value))
if hasattr(self, 'env'):
- self.validate(value, self.env.context)
+ self.validate(value, self.env.context) #pylint: disable=E1101
else:
self.validate(value)
return value
@@ -1007,6 +1007,7 @@ class Int(Number):
)
def __init__(self, name, *rules, **kw):
+ #pylint: disable=E1003
super(Number, self).__init__(name, *rules, **kw)
if (self.minvalue > self.maxvalue) and (self.minvalue is not None and self.maxvalue is not None):
@@ -1078,6 +1079,7 @@ class Float(Number):
)
def __init__(self, name, *rules, **kw):
+ #pylint: disable=E1003
super(Number, self).__init__(name, *rules, **kw)
if (self.minvalue > self.maxvalue) and (self.minvalue is not None and self.maxvalue is not None):
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 8053b2786..d516ed673 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -439,6 +439,7 @@ class CallbackInterface(Method):
Callback registration interface
"""
def __init__(self):
+ #pylint: disable=E1003
if not hasattr(self.__class__, 'PRE_CALLBACKS'):
self.__class__.PRE_CALLBACKS = []
if not hasattr(self.__class__, 'POST_CALLBACKS'):
@@ -512,6 +513,7 @@ class LDAPCreate(CallbackInterface, crud.Create):
takes_options = _attr_options
def get_args(self):
+ #pylint: disable=E1003
for key in self.obj.get_ancestor_primary_keys():
yield key
if self.obj.primary_key:
@@ -645,6 +647,7 @@ class LDAPQuery(CallbackInterface, crud.PKQuery):
Base class for commands that need to retrieve an existing entry.
"""
def get_args(self):
+ #pylint: disable=E1003
for key in self.obj.get_ancestor_primary_keys():
yield key
if self.obj.primary_key:
@@ -665,6 +668,7 @@ class LDAPMultiQuery(LDAPQuery):
)
def get_args(self):
+ #pylint: disable=E1003
for key in self.obj.get_ancestor_primary_keys():
yield key
if self.obj.primary_key:
@@ -1268,6 +1272,7 @@ class LDAPSearch(CallbackInterface, crud.Search):
)
def get_args(self):
+ #pylint: disable=E1003
for key in self.obj.get_ancestor_primary_keys():
yield key
yield Str('criteria?')
diff --git a/ipalib/plugins/cert.py b/ipalib/plugins/cert.py
index 0ddae7bbf..b219835d1 100644
--- a/ipalib/plugins/cert.py
+++ b/ipalib/plugins/cert.py
@@ -494,7 +494,7 @@ class cert_show(VirtualCommand):
if hostname:
# If we have a hostname we want to verify that the subject
# of the certificate matches it, otherwise raise an error
- if hostname != cert.subject.common_name:
+ if hostname != cert.subject.common_name: #pylint: disable=E1101
raise acierr
return dict(result=result)