lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1438 - nss-pam-ldapd/pynslcd

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1438 - nss-pam-ldapd/pynslcd



Author: arthur
Date: Thu Apr 28 20:47:39 2011
New Revision: 1438
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1438

Log:
put standard library imports before application imports and remove some unused 
imports

Modified:
   nss-pam-ldapd/pynslcd/alias.py
   nss-pam-ldapd/pynslcd/common.py
   nss-pam-ldapd/pynslcd/ether.py
   nss-pam-ldapd/pynslcd/group.py
   nss-pam-ldapd/pynslcd/host.py
   nss-pam-ldapd/pynslcd/netgroup.py
   nss-pam-ldapd/pynslcd/network.py
   nss-pam-ldapd/pynslcd/pam.py
   nss-pam-ldapd/pynslcd/passwd.py
   nss-pam-ldapd/pynslcd/protocol.py
   nss-pam-ldapd/pynslcd/rpc.py
   nss-pam-ldapd/pynslcd/service.py
   nss-pam-ldapd/pynslcd/shadow.py

Modified: nss-pam-ldapd/pynslcd/alias.py
==============================================================================
--- nss-pam-ldapd/pynslcd/alias.py      Thu Apr 28 20:32:52 2011        (r1437)
+++ nss-pam-ldapd/pynslcd/alias.py      Thu Apr 28 20:47:39 2011        (r1438)
@@ -1,7 +1,7 @@
 
 # alias.py - lookup functions for aliasnet addresses
 #
-# Copyright (C) 2010 Arthur de Jong
+# Copyright (C) 2010, 2011 Arthur de Jong
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -18,12 +18,11 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
+import ldap.filter
+
 import constants
 import common
 
-import ldap
-import ldap.filter
-
 
 class AliasRequest(common.Request):
 

Modified: nss-pam-ldapd/pynslcd/common.py
==============================================================================
--- nss-pam-ldapd/pynslcd/common.py     Thu Apr 28 20:32:52 2011        (r1437)
+++ nss-pam-ldapd/pynslcd/common.py     Thu Apr 28 20:47:39 2011        (r1438)
@@ -1,7 +1,7 @@
 
 # common.py - functions that are used by different modules
 #
-# Copyright (C) 2010 Arthur de Jong
+# Copyright (C) 2010, 2011 Arthur de Jong
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -18,13 +18,14 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
-import cfg
-import constants
-
 import re
 import ldap
 import ldap.dn
 
+import cfg
+import constants
+
+
 _validname_re = re.compile(r'^[a-z0-9._@$][a-z0-9._@$ 
\\~-]{0,98}[a-z0-9._@$~-]$', re.IGNORECASE)
 
 def isvalidname(name):

Modified: nss-pam-ldapd/pynslcd/ether.py
==============================================================================
--- nss-pam-ldapd/pynslcd/ether.py      Thu Apr 28 20:32:52 2011        (r1437)
+++ nss-pam-ldapd/pynslcd/ether.py      Thu Apr 28 20:47:39 2011        (r1438)
@@ -18,12 +18,12 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
-import constants
-import common
-
 import struct
 import ldap.filter
 
+import constants
+import common
+
 
 def ether_aton(ether):
     return struct.pack('BBBBBB', *(int(x, 16) for x in ether.split(':')))

Modified: nss-pam-ldapd/pynslcd/group.py
==============================================================================
--- nss-pam-ldapd/pynslcd/group.py      Thu Apr 28 20:32:52 2011        (r1437)
+++ nss-pam-ldapd/pynslcd/group.py      Thu Apr 28 20:47:39 2011        (r1438)
@@ -1,7 +1,7 @@
 
 # group.py - group entry lookup routines
 #
-# Copyright (C) 2010 Arthur de Jong
+# Copyright (C) 2010, 2011 Arthur de Jong
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -18,14 +18,12 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
-import constants
-import common
-import cfg
-
 import logging
-import ldap
 import ldap.filter
 
+import constants
+import common
+
 
 def clean(lst):
     for i in lst:

Modified: nss-pam-ldapd/pynslcd/host.py
==============================================================================
--- nss-pam-ldapd/pynslcd/host.py       Thu Apr 28 20:32:52 2011        (r1437)
+++ nss-pam-ldapd/pynslcd/host.py       Thu Apr 28 20:47:39 2011        (r1438)
@@ -18,13 +18,11 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
+import ldap.filter
+
 import constants
 import common
 
-import struct
-import ldap.filter
-import socket
-
 
 class HostRequest(common.Request):
 

Modified: nss-pam-ldapd/pynslcd/netgroup.py
==============================================================================
--- nss-pam-ldapd/pynslcd/netgroup.py   Thu Apr 28 20:32:52 2011        (r1437)
+++ nss-pam-ldapd/pynslcd/netgroup.py   Thu Apr 28 20:47:39 2011        (r1438)
@@ -18,14 +18,12 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
-import constants
-import common
-
-import struct
 import ldap.filter
-import socket
 import re
 
+import constants
+import common
+
 
 _netgroup_triple_re = 
re.compile(r'^\s*\(\s*(?P<host>.*)\s*,\s*(?P<user>.*)\s*,\s*(?P<domain>.*)\s*\)\s*$')
 

Modified: nss-pam-ldapd/pynslcd/network.py
==============================================================================
--- nss-pam-ldapd/pynslcd/network.py    Thu Apr 28 20:32:52 2011        (r1437)
+++ nss-pam-ldapd/pynslcd/network.py    Thu Apr 28 20:47:39 2011        (r1438)
@@ -18,13 +18,11 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
+import ldap.filter
+
 import constants
 import common
 
-import struct
-import ldap.filter
-import socket
-
 
 class NetworkRequest(common.Request):
 

Modified: nss-pam-ldapd/pynslcd/pam.py
==============================================================================
--- nss-pam-ldapd/pynslcd/pam.py        Thu Apr 28 20:32:52 2011        (r1437)
+++ nss-pam-ldapd/pynslcd/pam.py        Thu Apr 28 20:47:39 2011        (r1438)
@@ -1,7 +1,7 @@
 
 # pam.py - functions authentication, authorisation and session handling
 #
-# Copyright (C) 2010 Arthur de Jong
+# Copyright (C) 2010, 2011 Arthur de Jong
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -18,15 +18,15 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
-import constants
-import common
-import cfg
-
 import logging
 import ldap
 
+import constants
+import common
+import cfg
 import passwd
 
+
 def try_bind(userdn, password):
     # open a new connection
     conn = ldap.initialize(cfg.ldap_uri)

Modified: nss-pam-ldapd/pynslcd/passwd.py
==============================================================================
--- nss-pam-ldapd/pynslcd/passwd.py     Thu Apr 28 20:32:52 2011        (r1437)
+++ nss-pam-ldapd/pynslcd/passwd.py     Thu Apr 28 20:47:39 2011        (r1438)
@@ -1,7 +1,7 @@
 
 # passwd.py - lookup functions for user account information
 #
-# Copyright (C) 2010 Arthur de Jong
+# Copyright (C) 2010, 2011 Arthur de Jong
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -18,14 +18,12 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
-import constants
-import common
-import cfg
-
-import logging
 import ldap
 import ldap.filter
 
+import constants
+import common
+
 
 class PasswdRequest(common.Request):
 

Modified: nss-pam-ldapd/pynslcd/protocol.py
==============================================================================
--- nss-pam-ldapd/pynslcd/protocol.py   Thu Apr 28 20:32:52 2011        (r1437)
+++ nss-pam-ldapd/pynslcd/protocol.py   Thu Apr 28 20:47:39 2011        (r1438)
@@ -18,12 +18,11 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
+import ldap.filter
+
 import constants
 import common
 
-import struct
-import ldap.filter
-
 
 class ProtocolRequest(common.Request):
 

Modified: nss-pam-ldapd/pynslcd/rpc.py
==============================================================================
--- nss-pam-ldapd/pynslcd/rpc.py        Thu Apr 28 20:32:52 2011        (r1437)
+++ nss-pam-ldapd/pynslcd/rpc.py        Thu Apr 28 20:47:39 2011        (r1438)
@@ -18,12 +18,11 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
+import ldap.filter
+
 import constants
 import common
 
-import struct
-import ldap.filter
-
 
 class RpcRequest(common.Request):
 

Modified: nss-pam-ldapd/pynslcd/service.py
==============================================================================
--- nss-pam-ldapd/pynslcd/service.py    Thu Apr 28 20:32:52 2011        (r1437)
+++ nss-pam-ldapd/pynslcd/service.py    Thu Apr 28 20:47:39 2011        (r1438)
@@ -18,12 +18,11 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
+import ldap.filter
+
 import constants
 import common
 
-import struct
-import ldap.filter
-
 
 class ServiceRequest(common.Request):
 

Modified: nss-pam-ldapd/pynslcd/shadow.py
==============================================================================
--- nss-pam-ldapd/pynslcd/shadow.py     Thu Apr 28 20:32:52 2011        (r1437)
+++ nss-pam-ldapd/pynslcd/shadow.py     Thu Apr 28 20:47:39 2011        (r1438)
@@ -1,7 +1,7 @@
 
 # shadow.py - lookup functions for shadownet addresses
 #
-# Copyright (C) 2010 Arthur de Jong
+# Copyright (C) 2010, 2011 Arthur de Jong
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -18,11 +18,11 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
+import ldap.filter
+
 import constants
 import common
 
-import ldap.filter
-
 
 class ShadowRequest(common.Request):
 
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits