scripts/search-index
changeset 95 ebdbda3dd5d0
parent 94 6673de9bc911
child 98 8c6e36849f9a
--- a/scripts/search-index	Wed Feb 11 02:16:11 2009 +0200
+++ b/scripts/search-index	Wed Feb 11 02:21:43 2009 +0200
@@ -277,19 +277,14 @@
                 print "reloading all:",
 
         # stat for mtime
-        # XXX: replace with single utils.mtime()
-        elif os.path.exists(statefile_path) :
-            # get last update date for channel
-            mtime = utils.from_utc_timestamp(os.stat(statefile_path).st_mtime)
-            
-            if not options.quiet :
+        else :
+            # stat for mtime, None if unknown
+            mtime = utils.mtime(statefile_path, ignore_missing=True)
+
+            if mtime and not options.quiet :
                 print "last load=%s:" % mtime,
 
-        else :
-            # unknown, load all
-            mtime = None
-            
-            if not options.quiet :
+            elif not options.quiet :
                 print "no previous load state:",
  
         # only after some specific date?