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: