--- OSAS/OSA_system/archive.py 2003/10/05 19:11:09 1.1 +++ OSAS/OSA_system/archive.py 2003/12/18 17:22:29 1.3 @@ -532,11 +532,11 @@ class metacheck(Implicit, Persistent, Ro self.lines=[] if type(path)==StringType: - f = os.popen("/usr/local/mpiwg/archive/metacheck "+path,"r") + f = os.popen("/Users/dwinter/metacheck "+path,"r") self.lines.append(Error([path,self.parsearchive(f.readlines())])) else: for singlepath in path: - f = os.popen("/usr/local/mpiwg/archive/metacheck "+singlepath,"r") + f = os.popen("/Users/dwinter/metacheck "+singlepath,"r") self.lines.append(Error([singlepath,self.parsearchive(f.readlines())])) security.declarePublic('messages') @@ -636,6 +636,7 @@ def getText(nodelist): rc = "" for node in nodelist: + if node.nodeType == node.TEXT_NODE: rc = rc + node.data return rc @@ -734,18 +735,29 @@ def isdigilib2(path): def isFullText(path,folder_name): """check if foldername in path is full text""" + try: dom=xml.dom.minidom.parse(path+"/index.meta") - for node in dom.getElementsByTagName("dir"): - - if getText(node.getElementsByTagName("content-type")[0].childNodes)=="fulltext": - + except: + """ nothing""" + return 0 + for node in dom.getElementsByTagName("dir"): + + try: + child=getText(node.getElementsByTagName("content-type")[0].childNodes) + + if child =="fulltext": + if getText(node.getElementsByTagName("name")[0].childNodes)==folder_name: return 1 - return 0 - except: + except: + """nothing""" + #print "erro",node + #print sys.exc_info() + #return 0 - return 0 + return 0 + def isPresentation(path,folder_name):