diff options
author | Simo Sorce <simo@redhat.com> | 2015-05-07 12:33:40 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-05-07 14:29:49 -0400 |
commit | d8aa3e10398d0d23eefdbda899475ca32ec3abf6 (patch) | |
tree | f17e5fb0f9f0a1a922bcbd80ec798396c508f56d /ipsilon/info/infoldap.py | |
parent | 93d4e52712767fe955f3a44a60a6c6f0f909423b (diff) | |
download | ipsilon-d8aa3e10398d0d23eefdbda899475ca32ec3abf6.tar.gz ipsilon-d8aa3e10398d0d23eefdbda899475ca32ec3abf6.tar.xz ipsilon-d8aa3e10398d0d23eefdbda899475ca32ec3abf6.zip |
pylint 1.4.3 version fixespylint143
Pylint 1.4.3 completely stopped recognizing the star-args condition.
In order to avoid pylint error with > 1.4.3 stop caring for star-args
and add cmdline option to ignore those errors completly so older pylint
versions are happy too.
Also fix type() vs isinstance() checks, isinstance is generally a more
correct approach to check for calsses.
In some 'admin' files the type() -> isinstance() fix required to invert
the order in which ComplexList and MappingList are checked as the latter
is a subclass of ComplexList, so it needs to be checked first otherwise
the check for isinstance(option, ComplexList) matches for both and the
code stops funciotning properly.
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'ipsilon/info/infoldap.py')
-rw-r--r-- | ipsilon/info/infoldap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipsilon/info/infoldap.py b/ipsilon/info/infoldap.py index 84b4098..f87b37c 100644 --- a/ipsilon/info/infoldap.py +++ b/ipsilon/info/infoldap.py @@ -119,7 +119,7 @@ Info plugin that uses LDAP to retrieve user data. """ raise Exception('No unique user object could be found!') data = dict() for name, value in result[0][1].iteritems(): - if type(value) is list and len(value) == 1: + if isinstance(value, list) and len(value) == 1: value = value[0] data[name] = value return data |