X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-generate;h=4b589c598aa95ab930713ad441c8ffb16be66d74;hb=fe67fab54bca15f4820e4f0a911023ed10a743b7;hp=a8ee8543ef8490603f71ef142dc2353ed61d56d1;hpb=c61076ac9d401f7abf65d5e1eac7f5a666a32ba4;p=mirror%2Fuserdir-ldap.git diff --git a/ud-generate b/ud-generate index a8ee854..4b589c5 100755 --- a/ud-generate +++ b/ud-generate @@ -309,7 +309,7 @@ def GenShadowSudo(accounts, File, untrusted, current_host): if 'sudoPassword' in a: for entry in a['sudoPassword']: Match = re.compile('^('+UUID_FORMAT+') (confirmed:[0-9a-f]{40}|unconfirmed) ([a-z0-9.,*-]+) ([^ ]+)$').match(entry) - if Match == None: + if Match is None: continue uuid = Match.group(1) status = Match.group(2) @@ -918,7 +918,7 @@ def ExtractDNSInfo(x): Algorithm = 2 if key_prefix == 'ssh-ed25519': Algorithm = 4 - if Algorithm == None: + if Algorithm is None: continue # and more from the registry sshfp_digest_codepoints = [ (1, 'sha1'), (2, 'sha256') ] @@ -1142,7 +1142,7 @@ def get_hosts(ldap_conn): "mXRecord", "ipHostNumber", "dnsTTL", "machine", "architecture", "sshfpHostname"]) - if HostAttrs == None: + if HostAttrs is None: raise UDEmptyList, "No Hosts" HostAttrs.sort(lambda x, y: cmp((GetAttr(x, "hostname")).lower(), (GetAttr(y, "hostname")).lower()))