Silence pychecker and pylint warnings
This commit is contained in:
parent
8501067211
commit
105dba95ff
|
@ -4,7 +4,7 @@ UNIX Accounts Administration
|
|||
This module contains functions for creating, deleting, and manipulating
|
||||
UNIX user accounts and account groups in the CSC LDAP directory.
|
||||
"""
|
||||
import re, pwd, grp, os, pwd, subprocess
|
||||
import re, pwd, grp, os, subprocess
|
||||
from csc.common import conf
|
||||
from csc.common.excep import InvalidArgument
|
||||
from csc.backends import ldapi, krb
|
||||
|
|
|
@ -9,7 +9,7 @@ Transactions are used in each method that modifies the database.
|
|||
Future changes to the members database that need to be atomic
|
||||
must also be moved into this module.
|
||||
"""
|
||||
import re, ldap, os, pwd
|
||||
import re, ldap
|
||||
from csc.adm import terms
|
||||
from csc.backends import ldapi
|
||||
from csc.common import conf
|
||||
|
@ -234,9 +234,6 @@ def list_positions():
|
|||
|
||||
ceo_ldap = ldap_connection.ldap
|
||||
user_base = ldap_connection.user_base
|
||||
escape = ldap_connection.escape
|
||||
|
||||
if not ldap_connection.connected(): ldap_connection.connect()
|
||||
|
||||
members = ceo_ldap.search_s(user_base, ldap.SCOPE_SUBTREE, '(position=*)')
|
||||
positions = {}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import random, time, re
|
||||
import urwid, urwid.curses_display
|
||||
import random
|
||||
import urwid.curses_display
|
||||
|
||||
from csc.apps.urwid.widgets import *
|
||||
from csc.apps.urwid.window import *
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import urwid
|
||||
from csc.apps.urwid.widgets import *
|
||||
from csc.apps.urwid.window import *
|
||||
from csc.apps.urwid.ldapfilter import LdapFilter
|
||||
|
||||
from csc.adm import accounts, members, terms
|
||||
from csc.common.excep import InvalidArgument
|
||||
|
|
|
@ -56,7 +56,7 @@ class TermPage(WizardPanel):
|
|||
def check(self):
|
||||
try:
|
||||
self.state['terms'] = terms.interval( self.start.get_edit_text(), self.count.value() )
|
||||
except e:
|
||||
except Exception, e:
|
||||
self.focus_widget( self.start )
|
||||
set_status( "Invalid start term" )
|
||||
return True
|
||||
|
|
|
@ -385,8 +385,6 @@ class LDAPConnection(object):
|
|||
raise LDAPException("group search failed: %s" % e)
|
||||
|
||||
# list for groups found
|
||||
group_cns = []
|
||||
|
||||
results = {}
|
||||
for match in matches:
|
||||
dn, attrs = match
|
||||
|
|
Loading…
Reference in New Issue