Enable pylint trailing-whitespace check

Enables check and fixes:
************* Module ipapython.log_manager
ipapython/log_manager.py:808: [C0303(trailing-whitespace), ] Trailing
whitespace)
************* Module ipachangeconf
contrib/RHEL4/ipachangeconf.py:28: [C0303(trailing-whitespace), ]
Trailing whitespace)
contrib/RHEL4/ipachangeconf.py:116: [C0303(trailing-whitespace), ]
Trailing whitespace)
************* Module ipalib.plugins.pwpolicy
ipalib/plugins/pwpolicy.py:174: [C0303(trailing-whitespace), ] Trailing
whitespace)
ipalib/plugins/pwpolicy.py:180: [C0303(trailing-whitespace), ] Trailing
whitespace)

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Martin Basti
2015-12-16 23:43:09 +01:00
committed by Jan Cholasta
parent 89e16a8053
commit 1f6b1c2de7
4 changed files with 5 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ def openLocked(filename, perms):
fd = -1
try:
fd = os.open(filename, os.O_RDWR | os.O_CREAT, perms)
fcntl.lockf(fd, fcntl.LOCK_EX)
except OSError as e:
if fd != -1:
@@ -113,7 +113,7 @@ class IPAChangeConf:
return False
if not cl.endswith(self.sectnamdel[1]):
return False
return cl[len(self.sectnamdel[0]):-len(self.sectnamdel[1])]
return cl[len(self.sectnamdel[0]):-len(self.sectnamdel[1])]
def matchSubSection(self, line):
if self.matchComment(line):

View File

@@ -171,13 +171,13 @@ class cosentry_add(LDAPCreate):
def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
assert isinstance(dn, DN)
# check for existence of the group
group_dn = self.api.Object.group.get_dn(keys[-1])
try:
result = ldap.get_entry(group_dn, ['objectclass'])
except errors.NotFound:
self.api.Object.group.handle_not_found(keys[-1])
self.api.Object.group.handle_not_found(keys[-1])
oc = [x.lower() for x in result['objectclass']]
if 'mepmanagedentry' in oc:

View File

@@ -805,7 +805,7 @@ class LogManager(object):
default_level attribute but that does not update the configure_state,
this method is provided as a convenience to simultaneously set the
configure_state if so desired.
:parameters:
level
The new default level for the log manager. See

View File

@@ -302,7 +302,6 @@ def main():
linter.set_option('disable', 'old-style-class')
linter.set_option('disable', 'superfluous-parens')
linter.set_option('disable', 'too-many-lines')
linter.set_option('disable', 'trailing-whitespace')
linter.set_option('disable', 'unidiomatic-typecheck')
linter.set_option('disable', 'R')