From 989211b1709990f50ec31cb764dc2cf8b2751dd5 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 7 Jul 2008 11:24:27 +0200 Subject: [PATCH] last mod is last mod file not last mod dir --- oxdbarchive/model.py | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/oxdbarchive/model.py b/oxdbarchive/model.py index 9691897..91d5159 100644 --- a/oxdbarchive/model.py +++ b/oxdbarchive/model.py @@ -1,25 +1,22 @@ # -*- coding: utf-8 -*- # vi:si:et:sw=2:sts=2:ts=2 -import gzip -import StringIO +from datetime import datetime from glob import glob +from os.path import abspath, join, dirname, exists +from urllib import quote, quote_plus +import gzip +import math import os +import re +import shutil +import socket +import StringIO +import time +import urllib2 from sqlobject import * from turbogears.database import PackageHub import turbogears -import re -from urllib import quote, quote_plus -import urllib2 -import os -from os.path import abspath, join, dirname, exists -from datetime import datetime -import time -import math -from glob import glob -import shutil -import socket - import simplejson from oxlib.net import getUrl import oxlib @@ -31,6 +28,7 @@ from oxdb_utils import oxdb_title, oxdb_director, oxdb_id, oxdb_makedir from extract import * import midentify + def debug(string): #print string return @@ -73,7 +71,7 @@ class Archive(SQLObject): return True def sinceLastModification(self): - return time.time() - max([os.stat(f).st_mtime for f in glob('%s/*'% self.basePath)]) + return time.time() - max([os.stat(f).st_mtime for f in glob('%s*/*'% self.basePath)]) def notifyFrontend(self, action, md5sum): if self.baseUrlFrontend: