diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2011-03-24 22:18:31 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2011-03-24 22:18:31 +0000 |
commit | 4578bac38dd1ef63d0850a5139a7e4dbca3127f3 (patch) | |
tree | 26f613b52fe237d3376924b8f12670a484e41385 | |
parent | cce56703b157ed2d0220469fb2e1a8e9c6946a58 (diff) |
fix the case where the RDN is for some reason not in the cn
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1409 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r-- | pynslcd/host.py | 2 | ||||
-rw-r--r-- | pynslcd/network.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pynslcd/host.py b/pynslcd/host.py index dcd03e3..3c1d5be 100644 --- a/pynslcd/host.py +++ b/pynslcd/host.py @@ -43,7 +43,7 @@ class HostRequest(common.Request): print 'Error: entry %s does not contain %s value' % ( dn, self.attmap_cn ) if not hostname: hostname = hostnames.pop(0) - else: + elif hostname in hostnames: hostnames.remove(hostname) addresses = attributes.get(self.attmap_ipHostNumber, []) if not addresses: diff --git a/pynslcd/network.py b/pynslcd/network.py index 672b9e4..b32824c 100644 --- a/pynslcd/network.py +++ b/pynslcd/network.py @@ -43,7 +43,7 @@ class NetworkRequest(common.Request): print 'Error: entry %s does not contain %s value' % ( dn, self.attmap_cn) if not networkname: networkname = networknames.pop(0) - else: + elif networkname in networknames: networknames.remove(networkname) addresses = attributes.get(self.attmap_ipNetworkNumber, []) if not addresses: |