ud-generate: remove a trailing semi-colon
[mirror/userdir-ldap.git] / ud-generate
index 4b589c5..dacd0d0 100755 (executable)
@@ -184,9 +184,9 @@ def IsInGroup(account, allowed, current_host):
   return False
 
 def Die(File, F, Fdb):
-   if F != None:
+   if F is not None:
       F.close()
-   if Fdb != None:
+   if Fdb is not None:
       Fdb.close()
    try: 
       os.remove(File + ".tmp")
@@ -198,10 +198,10 @@ def Die(File, F, Fdb):
       pass
 
 def Done(File, F, Fdb):
-   if F != None:
+   if F is not None:
       F.close()
       os.rename(File + ".tmp", File)
-   if Fdb != None:
+   if Fdb is not None:
       Fdb.close()
       os.rename(File + ".tdb.tmp", File + ".tdb")
 
@@ -848,7 +848,7 @@ def GenDNS(accounts, File):
                   F.write(Line)
 
                   Host = Split[0] + DNSZone
-                  if BSMTPCheck.match(Line) != None:
+                  if BSMTPCheck.match(Line) is not None:
                      F.write("; Has BSMTP\n")
 
                   # Write some identification information
@@ -989,7 +989,7 @@ def GenBSMTP(accounts, File, HomePrefix):
                   Line = " ".join(Split) + "\n"
      
                   Host = Split[0] + DNSZone
-                  if BSMTPCheck.match(Line) != None:
+                  if BSMTPCheck.match(Line) is not None:
                       F.write("%s: user=%s group=Debian file=%s%s/bsmtp/%s\n"%(Host,
                                   a['uid'], HomePrefix, a['uid'], Host))
      
@@ -1330,7 +1330,7 @@ def generate_host(host, global_dir, all_accounts, all_hosts, ssh_userkeys):
          v = entry.split('=',1)
          if v[0] != 'GITOLITE' or len(v) != 2: continue
          options = v[1].split(',')
-         group = options.pop(0);
+         group = options.pop(0)
          gitolite_accounts = filter(lambda x: IsInGroup(x, [group], current_host), all_accounts)
          if 'nohosts' not in options:
             gitolite_hosts = filter(lambda x: GitoliteExportHosts.match(x[1]["hostname"][0]), all_hosts)