Write both time of last ldap update and time of last run to trace file
authorStephen Gran <steve@lobefin.net>
Fri, 9 Mar 2012 20:17:26 +0000 (20:17 +0000)
committerStephen Gran <steve@lobefin.net>
Fri, 9 Mar 2012 20:17:26 +0000 (20:17 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
ud-generate

index d699633..004e64a 100755 (executable)
@@ -1246,11 +1246,10 @@ except IOError, e:
    else:
       raise e
 
-fd = open(os.path.join(GenerateDir, "last_update.trace"), "w")
-fd.write("%s\n%s\n" % (last, int(time.time())))
-fd.close()
-
 if cache_last_mod[0] >= last:
+   fd = open(os.path.join(GenerateDir, "last_update.trace"), "w")
+   fd.write("%s\n%s\n" % (last, int(time.time())))
+   fd.close()
    sys.exit(0)
 
 # Fetch all the groups
@@ -1282,6 +1281,10 @@ finally:
    if lock is not None:
       lock.release()
 
+fd = open(os.path.join(GenerateDir, "last_update.trace"), "w")
+fd.write("%s\n%s\n" % (last, int(time.time())))
+fd.close()
+
 # vim:set et:
 # vim:set ts=3:
 # vim:set shiftwidth=3: