summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2015-12-17 01:29:29 +0100
committerJan Cholasta <jcholast@redhat.com>2015-12-23 07:59:22 +0100
commit00fd28e02689d49f89429b663b16ce4ca484e7d6 (patch)
treede1a34d25bcca07f96e2ade7a7acde2a4359a8ff
parentded70b6c6ea14458eef35dede5bbc276449f4fe9 (diff)
downloadfreeipa-00fd28e02689d49f89429b663b16ce4ca484e7d6.tar.gz
freeipa-00fd28e02689d49f89429b663b16ce4ca484e7d6.tar.xz
freeipa-00fd28e02689d49f89429b663b16ce4ca484e7d6.zip
Enable pylint unnecessary-pass check
Enables check and removes extra pass statement from code. Reviewed-By: Jan Cholasta <jcholast@redhat.com>
-rw-r--r--ipalib/plugins/automount.py3
-rw-r--r--ipalib/plugins/stageuser.py4
-rw-r--r--ipalib/plugins/user.py2
-rw-r--r--ipaserver/dcerpc.py2
-rw-r--r--ipaserver/install/bindinstance.py1
-rw-r--r--ipaserver/install/dnskeysyncinstance.py1
-rw-r--r--ipaserver/install/dsinstance.py1
-rw-r--r--ipaserver/install/httpinstance.py1
-rw-r--r--ipaserver/install/krbinstance.py1
-rw-r--r--ipaserver/install/ntpinstance.py1
-rw-r--r--ipaserver/install/opendnssecinstance.py1
-rw-r--r--ipaserver/install/replication.py1
-rw-r--r--ipatests/test_xmlrpc/xmlrpc_test.py1
-rwxr-xr-xmake-lint1
14 files changed, 2 insertions, 19 deletions
diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py
index 91a0613bb..d673ef997 100644
--- a/ipalib/plugins/automount.py
+++ b/ipalib/plugins/automount.py
@@ -472,7 +472,6 @@ class automountlocation_import(LDAPQuery):
pass
elif options.get('continue', False):
result['duplicatekeys'].append(am[0])
- pass
else:
raise errors.DuplicateEntry(
message=_('key %(key)s already exists') % dict(
@@ -488,7 +487,6 @@ class automountlocation_import(LDAPQuery):
pass
elif options.get('continue', False):
result['duplicatemaps'].append(am[0])
- pass
else:
raise errors.DuplicateEntry(
message=_('map %(map)s already exists') % dict(
@@ -531,7 +529,6 @@ class automountlocation_import(LDAPQuery):
except errors.DuplicateEntry as e:
if options.get('continue', False):
result['duplicatekeys'].append(am[0])
- pass
else:
raise e
diff --git a/ipalib/plugins/stageuser.py b/ipalib/plugins/stageuser.py
index bbbaf55a5..a134e686b 100644
--- a/ipalib/plugins/stageuser.py
+++ b/ipalib/plugins/stageuser.py
@@ -569,7 +569,6 @@ class stageuser_activate(LDAPQuery):
self.log.debug("merge: %s:%r wiped" % (attr, v))
except:
self.log.debug("merge %s: [no_print %s]" % (attr, v.__class__.__name__))
- pass
if isinstance(entry_to[attr], (list, tuple)):
# multi value attribute
if v not in entry_to[attr]:
@@ -586,7 +585,7 @@ class stageuser_activate(LDAPQuery):
self.log.debug("Add: %s:%r" % (attr, v))
except:
self.log.debug("Add %s: [no_print %s]" % (attr, v.__class__.__name__))
- pass
+
if isinstance(entry_to[attr], (list, tuple)):
# multi value attribute
if attr.lower() == 'objectclass':
@@ -697,7 +696,6 @@ class stageuser_activate(LDAPQuery):
self._exc_wrapper(args, options, ldap.delete_entry)(active_dn)
except:
self.log.error("Fail to cleanup activation. The user remains active %s" % (active_dn))
- pass
raise
# add the user we just created into the default primary group
diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py
index 97ba4d321..9d82366cb 100644
--- a/ipalib/plugins/user.py
+++ b/ipalib/plugins/user.py
@@ -1066,7 +1066,6 @@ class user_status(LDAPQuery):
except errors.NotFound:
# If this happens we have some pretty serious problems
self.error('No IPA masters found!')
- pass
entries = []
count = 0
@@ -1100,7 +1099,6 @@ class user_status(LDAPQuery):
newresult[attr][0] = unicode(time.strftime('%Y-%m-%dT%H:%M:%SZ', newtime))
except Exception as e:
self.debug("time conversion failed with %s" % str(e))
- pass
newresult['server'] = host
if options.get('raw', False):
time_format = '%Y%m%d%H%M%SZ'
diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py
index b206b7aba..13cb7767c 100644
--- a/ipaserver/dcerpc.py
+++ b/ipaserver/dcerpc.py
@@ -1104,7 +1104,7 @@ class TrustDomainInstance(object):
self._pipe.SetInformationTrustedDomain(trustdom_handle, lsa.LSA_TRUSTED_DOMAIN_INFO_INFO_EX, info)
except RuntimeError as e:
root_logger.error('unable to set trust to transitive: %s' % (str(e)))
- pass
+
if self.info['is_pdc']:
self.update_ftinfo(another_domain)
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index 6c0d73015..fab458ce4 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -1240,7 +1240,6 @@ class BindInstance(service.Service):
self.fstore.restore_file(f)
except ValueError as error:
root_logger.debug(error)
- pass
# disabled by default, by ldap_enable()
if enabled:
diff --git a/ipaserver/install/dnskeysyncinstance.py b/ipaserver/install/dnskeysyncinstance.py
index ecf513e2d..4ae2d2895 100644
--- a/ipaserver/install/dnskeysyncinstance.py
+++ b/ipaserver/install/dnskeysyncinstance.py
@@ -491,7 +491,6 @@ class DNSKeySyncInstance(service.Service):
self.fstore.restore_file(f)
except ValueError as error:
self.logger.debug(error)
- pass
# remove softhsm pin, to make sure new installation will generate
# new token database
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index 98ad24f73..3d5734efe 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -922,7 +922,6 @@ class DsInstance(service.Service):
self.fstore.restore_file(paths.SYSCONFIG_DIRSRV)
except ValueError as error:
root_logger.debug(error)
- pass
# disabled during IPA installation
if enabled:
diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py
index d76be6bac..3b46dce82 100644
--- a/ipaserver/install/httpinstance.py
+++ b/ipaserver/install/httpinstance.py
@@ -503,7 +503,6 @@ class HTTPInstance(service.Service):
self.fstore.restore_file(f)
except ValueError as error:
root_logger.debug(error)
- pass
installutils.remove_keytab(paths.IPA_KEYTAB)
installutils.remove_ccache(ccache_path=paths.KRB5CC_HTTPD,
diff --git a/ipaserver/install/krbinstance.py b/ipaserver/install/krbinstance.py
index c0a78cb15..31149752a 100644
--- a/ipaserver/install/krbinstance.py
+++ b/ipaserver/install/krbinstance.py
@@ -394,7 +394,6 @@ class KrbInstance(service.Service):
self.fstore.restore_file(f)
except ValueError as error:
root_logger.debug(error)
- pass
# disabled by default, by ldap_enable()
if enabled:
diff --git a/ipaserver/install/ntpinstance.py b/ipaserver/install/ntpinstance.py
index 239fdf5c0..8b0f0e539 100644
--- a/ipaserver/install/ntpinstance.py
+++ b/ipaserver/install/ntpinstance.py
@@ -178,7 +178,6 @@ class NTPInstance(service.Service):
self.fstore.restore_file(paths.NTP_CONF)
except ValueError as error:
root_logger.debug(error)
- pass
if enabled:
self.enable()
diff --git a/ipaserver/install/opendnssecinstance.py b/ipaserver/install/opendnssecinstance.py
index eebaeccb3..1c6aaeefa 100644
--- a/ipaserver/install/opendnssecinstance.py
+++ b/ipaserver/install/opendnssecinstance.py
@@ -376,7 +376,6 @@ class OpenDNSSECInstance(service.Service):
self.fstore.restore_file(f)
except ValueError as error:
root_logger.debug(error)
- pass
self.restore_state("KASP_DB_configured") # just eat state
diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py
index 03965a278..19592e21f 100644
--- a/ipaserver/install/replication.py
+++ b/ipaserver/install/replication.py
@@ -407,7 +407,6 @@ class ReplicationManager(object):
conn.add_entry(ent)
except errors.DuplicateEntry:
conn.modify_s(dn, [(ldap.MOD_REPLACE, "userpassword", pw)])
- pass
def delete_replication_manager(self, conn, dn=REPL_MAN_DN):
assert isinstance(dn, DN)
diff --git a/ipatests/test_xmlrpc/xmlrpc_test.py b/ipatests/test_xmlrpc/xmlrpc_test.py
index 3864e70be..8140364a5 100644
--- a/ipatests/test_xmlrpc/xmlrpc_test.py
+++ b/ipatests/test_xmlrpc/xmlrpc_test.py
@@ -301,7 +301,6 @@ class Declarative(XMLRPC_test):
api.Command[cmd](*args, **options)
except (errors.NotFound, errors.EmptyModlist) as e:
print(e)
- pass
def test_command(self, index, declarative_test_definition):
"""Run an individual test
diff --git a/make-lint b/make-lint
index d52bdb630..4d21c6e82 100755
--- a/make-lint
+++ b/make-lint
@@ -275,7 +275,6 @@ def main():
linter.set_option('disable', 'super-init-not-called')
linter.set_option('disable', 'undefined-loop-variable')
linter.set_option('disable', 'unnecessary-lambda')
- linter.set_option('disable', 'unnecessary-pass')
linter.set_option('disable', 'unnecessary-semicolon')
linter.set_option('disable', 'unused-argument')
linter.set_option('disable', 'unused-variable')