--- OSAS/OSA_system/OSAS_add.py 2003/12/11 14:06:16 1.8 +++ OSAS/OSA_system/OSAS_add.py 2004/01/21 07:43:01 1.9 @@ -33,14 +33,18 @@ def add(self, no_upload=0): def getISO(): - f=file('/usr/local/mpiwg/Zope/lib/python/Products/OSA_system/iso639-1.inc','r').readlines() - ret={} - for lineraw in f: - line=lineraw.encode('ascii','replace') - value=string.split(line,'\t')[0].encode('ascii','replace') - key=string.split(line,'\t')[1].encode('ascii','replace') - + try: + f=file('/usr/local/mpiwg/Zope/lib/python/Products/OSA_system/iso639-1.inc','r').readlines() + #f=file('OSA_system/iso639-1.inc','r').readlines() + ret={} + for lineraw in f: + line=lineraw.encode('ascii','replace') + value=string.split(line,'\t')[0].encode('ascii','replace') + key=string.split(line,'\t')[1].encode('ascii','replace') + ret[key]=value + except: + ret={} return ret def add2(self): @@ -177,7 +181,11 @@ def addPresentation(self,path): try: author=archive.getText(dom.getElementsByTagName('author')[0].childNodes) except: - author=archive.getText(dom.getElementsByTagName('Author')[0].childNodes) + try: + author=archive.getText(dom.getElementsByTagName('Author')[0].childNodes) + except: + author=archive.getText(dom.getElementsByTagName('Editor')[0].childNodes) + title=archive.getText(dom.getElementsByTagName('title')[0].childNodes) try: date=archive.getText(dom.getElementsByTagName('year')[0].childNodes)