X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-sshlist;h=7df02429ee60dfd803e1ea36b551fedaec2e526a;hb=refs%2Fheads%2Fsalsa;hp=279dc98f9b9563014ab00c69d8d9156f97174ff3;hpb=bd63e867238eb6d8c5756f43f7e2f4681eb11098;p=mirror%2Fuserdir-ldap.git diff --git a/ud-sshlist b/ud-sshlist index 279dc98..7df0242 100755 --- a/ud-sshlist +++ b/ud-sshlist @@ -12,12 +12,12 @@ # # It also understand .qmail type files -import string, re, time, getopt, os, sys, pwd, stat; +import re, time, getopt, os, sys, pwd, stat; SSHAuthSplit = re.compile('^(.* )?(\d+) (\d+) (\d+) ?(.+)$'); while (1): - File = string.strip(sys.stdin.readline()); + File = sys.stdin.readline().strip() if File == "": break; @@ -32,12 +32,12 @@ while (1): Forward = open(File,"r"); Lines = []; while (1): - Line = string.strip(Forward.readline()); + Line = Forward.readline().strip() if Line == "": break; if Line[0] == '#' or Line[0] == '\n': continue; - if SSHAuthSplit.match(Line) == None: + if SSHAuthSplit.match(Line) is None: print "Bad line", File; else: Lines.append(Line);